mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-30 22:47:16 +08:00
mdbx: revert returning MDBX_ENODATA
from cursor-next.
This commit is contained in:
parent
9511bc491a
commit
6866fa3eaa
@ -13805,7 +13805,7 @@ static int mdbx_cursor_next(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
|
||||
mp = mc->mc_pg[mc->mc_top];
|
||||
if (unlikely(mc->mc_flags & C_EOF)) {
|
||||
if (mc->mc_ki[mc->mc_top] + 1u >= page_numkeys(mp))
|
||||
return (mc->mc_flags & C_SUB) ? MDBX_NOTFOUND : MDBX_ENODATA;
|
||||
return MDBX_NOTFOUND;
|
||||
mc->mc_flags ^= C_EOF;
|
||||
}
|
||||
|
||||
|
@ -1181,13 +1181,6 @@ bool testcase::speculum_verify() {
|
||||
log_error("false-negative cursor-eof: %u, rc %i", n, eof);
|
||||
rc = false;
|
||||
}
|
||||
err = mdbx_cursor_get(cursor, &akey, &avalue, MDBX_GET_CURRENT);
|
||||
if (err == MDBX_SUCCESS)
|
||||
err = mdbx_cursor_get(cursor, &akey, &avalue, MDBX_NEXT);
|
||||
if (err != MDBX_ENODATA) {
|
||||
log_error("unexpected %d for MDBX_GET_CURRENT at EOF", err);
|
||||
rc = false;
|
||||
}
|
||||
}
|
||||
mdbx_cursor_close(cursor);
|
||||
return rc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user