mdbx: refine mdbx_page_search().

Change-Id: I9c87ae2ffe317538813ebec971ad093936f4c504
This commit is contained in:
Leo Yuriev 2017-05-28 13:43:52 +03:00
parent 9318e4cabb
commit 91bc3129d5

View File

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