mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 08:39:37 -05:00
ITS#8355 fix subcursors
make sure C_DEL gets reset in subcursor after it moves.
This commit is contained in:
parent
b5018e26bc
commit
8c215aa970
1 changed files with 5 additions and 1 deletions
|
|
@ -6458,8 +6458,10 @@ mdb_cursor_next(MDB_cursor *mc, MDB_val *key, MDB_val *data, MDB_cursor_op op)
|
|||
|
||||
DPRINTF(("cursor_next: top page is %"Y"u in cursor %p",
|
||||
mdb_dbg_pgno(mp), (void *) mc));
|
||||
if (mc->mc_flags & C_DEL)
|
||||
if (mc->mc_flags & C_DEL) {
|
||||
mc->mc_flags ^= C_DEL;
|
||||
goto skip;
|
||||
}
|
||||
|
||||
if (mc->mc_ki[mc->mc_top] + 1u >= NUMKEYS(mp)) {
|
||||
DPUTS("=====> move to next sibling page");
|
||||
|
|
@ -6545,6 +6547,8 @@ mdb_cursor_prev(MDB_cursor *mc, MDB_val *key, MDB_val *data, MDB_cursor_op op)
|
|||
DPRINTF(("cursor_prev: top page is %"Y"u in cursor %p",
|
||||
mdb_dbg_pgno(mp), (void *) mc));
|
||||
|
||||
mc->mc_flags &= ~(C_EOF|C_DEL);
|
||||
|
||||
if (mc->mc_ki[mc->mc_top] == 0) {
|
||||
DPUTS("=====> move to prev sibling page");
|
||||
if ((rc = mdb_cursor_sibling(mc, 0)) != MDB_SUCCESS) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue