mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-21 17:38:20 +08:00
mdbx: refine mdbx_page_search().
Change-Id: I9c87ae2ffe317538813ebec971ad093936f4c504
This commit is contained in:
parent
9318e4cabb
commit
91bc3129d5
@ -4952,7 +4952,8 @@ static int mdbx_page_search(MDBX_cursor *mc, MDBX_val *key, int flags) {
|
||||
if (unlikely(mc->mc_txn->mt_flags & MDBX_TXN_BLOCKED)) {
|
||||
mdbx_debug("transaction has failed, must abort");
|
||||
return MDBX_BAD_TXN;
|
||||
} else {
|
||||
}
|
||||
|
||||
/* Make sure we're using an up-to-date root */
|
||||
if (unlikely(*mc->mc_dbflag & DB_STALE)) {
|
||||
MDBX_cursor mc2;
|
||||
@ -4991,7 +4992,6 @@ static int mdbx_page_search(MDBX_cursor *mc, MDBX_val *key, int flags) {
|
||||
mdbx_debug("tree is empty");
|
||||
return MDBX_NOTFOUND;
|
||||
}
|
||||
}
|
||||
|
||||
mdbx_cassert(mc, root >= NUM_METAS);
|
||||
if (!mc->mc_pg[0] || mc->mc_pg[0]->mp_pgno != root)
|
||||
|
Loading…
x
Reference in New Issue
Block a user