Revert "Revert "Use mdb_page_loose() more""

This reverts commit 7d590039f2.
mdb.crypto
Niko 2 years ago
parent 8f5590a34b
commit b1984f3964
  1. 4
      libraries/liblmdb/mdb.c

@ -9987,7 +9987,7 @@ mdb_rebalance(MDB_cursor *mc)
mc->mc_db->md_root = P_INVALID;
mc->mc_db->md_depth = 0;
mc->mc_db->md_leaf_pages = 0;
rc = mdb_midl_append(&mc->mc_txn->mt_free_pgs, mp->mp_pgno);
rc = mdb_page_loose(mc, mp);
if (rc)
return rc;
/* Adjust cursors pointing to mp */
@ -10015,7 +10015,7 @@ mdb_rebalance(MDB_cursor *mc)
} else if (IS_BRANCH(mp) && NUMKEYS(mp) == 1) {
int i;
DPUTS("collapsing root page!");
rc = mdb_midl_append(&mc->mc_txn->mt_free_pgs, mp->mp_pgno);
rc = mdb_page_loose(mc, mp);
if (rc)
return rc;
mc->mc_db->md_root = NODEPGNO(NODEPTR(mp, 0));

Loading…
Cancel
Save