mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 03:34:12 +08:00
mdbx: minor refine/fix cursor_check()
internals.
Change-Id: I89ea9a5336b88e7d0201a7f59d66a8bc53849172
This commit is contained in:
parent
636c212235
commit
3ed99f8c20
@ -16830,8 +16830,8 @@ static __cold int mdbx_cursor_check(MDBX_cursor *mc, unsigned options) {
|
||||
mc->mc_txn->tw.dirtyroom +
|
||||
mc->mc_txn->tw.dirtylist->length ==
|
||||
mc->mc_txn->mt_env->me_options.dp_limit);
|
||||
mdbx_cassert(mc, mc->mc_top == mc->mc_snum - 1);
|
||||
if (unlikely(mc->mc_top != mc->mc_snum - 1))
|
||||
mdbx_cassert(mc, mc->mc_top == mc->mc_snum - 1 || (options & C_UPDATING));
|
||||
if (unlikely(mc->mc_top != mc->mc_snum - 1) && (options & C_UPDATING) == 0)
|
||||
return MDBX_CURSOR_FULL;
|
||||
mdbx_cassert(mc, (options & C_UPDATING) ? mc->mc_snum <= mc->mc_db->md_depth
|
||||
: mc->mc_snum == mc->mc_db->md_depth);
|
||||
|
Loading…
x
Reference in New Issue
Block a user