mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 01:58:33 -05:00
Tweak cursor_next C_EOF check
Allow C_EOF flag to be stale
This commit is contained in:
parent
d84dee516f
commit
511f5880e2
1 changed files with 5 additions and 3 deletions
|
|
@ -6596,15 +6596,17 @@ mdb_cursor_next(MDB_cursor *mc, MDB_val *key, MDB_val *data, MDB_cursor_op op)
|
|||
MDB_node *leaf;
|
||||
int rc;
|
||||
|
||||
if ((mc->mc_flags & C_EOF) ||
|
||||
((mc->mc_flags & C_DEL) && op == MDB_NEXT_DUP)) {
|
||||
if ((mc->mc_flags & C_DEL && op == MDB_NEXT_DUP))
|
||||
return MDB_NOTFOUND;
|
||||
}
|
||||
|
||||
if (!(mc->mc_flags & C_INITIALIZED))
|
||||
return mdb_cursor_first(mc, key, data);
|
||||
|
||||
mp = mc->mc_pg[mc->mc_top];
|
||||
|
||||
if ((mc->mc_flags & C_EOF) && mc->mc_ki[mc->mc_top] >= NUMKEYS(mp)-1)
|
||||
return MDB_NOTFOUND;
|
||||
|
||||
if (mc->mc_db->md_flags & MDB_DUPSORT) {
|
||||
leaf = NODEPTR(mp, mc->mc_ki[mc->mc_top]);
|
||||
if (F_ISSET(leaf->mn_flags, F_DUPDATA)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue