1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
*** ../db/db_cam.c.orig 2006-01-11 03:19:21.000000000 +1100
--- ../db/db_cam.c 2006-03-01 13:59:01.000000000 +1100
***************
*** 579,589 ****
flags == DB_NEXT || flags == DB_NEXT_DUP || flags == DB_PREV)) {
if (tmp_rmw && (ret = dbc_arg->c_am_writelock(dbc_arg)) != 0)
return (ret);
! if ((ret = __db_c_idup(cp->opd, &opd, DB_POSITION)) != 0)
return (ret);
! switch (ret =
! opd->c_am_get(opd, key, data, flags, NULL)) {
case 0:
goto done;
case DB_NOTFOUND:
--- 579,590 ----
flags == DB_NEXT || flags == DB_NEXT_DUP || flags == DB_PREV)) {
if (tmp_rmw && (ret = dbc_arg->c_am_writelock(dbc_arg)) != 0)
return (ret);
! if (F_ISSET(dbc_arg, DBC_TRANSIENT))
! opd = cp->opd;
! else if ((ret = __db_c_idup(cp->opd, &opd, DB_POSITION)) != 0)
return (ret);
! switch (ret = opd->c_am_get(opd, key, data, flags, NULL)) {
case 0:
goto done;
case DB_NOTFOUND:
***************
*** 596,607 ****
--- 597,614 ----
if ((ret = __db_c_close(opd)) != 0)
goto err;
opd = NULL;
+ if (F_ISSET(dbc_arg, DBC_TRANSIENT))
+ cp->opd = NULL;
break;
}
goto err;
default:
goto err;
}
+ } else if (cp->opd != NULL && F_ISSET(dbc_arg, DBC_TRANSIENT)) {
+ if ((ret = __db_c_close(cp->opd)) != 0)
+ goto err;
+ cp->opd = NULL;
}
/*
|