mdbx: revert returning MDBX_ENODATA from cursor-next.

This commit is contained in:
Leonid Yuriev 2021-12-30 22:12:04 +03:00
parent 9511bc491a
commit 6866fa3eaa
2 changed files with 1 additions and 8 deletions

View File

@ -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;
}

View File

@ -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;