Revert "Use mdb_page_loose() more"

This reverts commit 12ee1a2d71.
lofire0_1_0
Niko 2 years ago
parent d5308c43c1
commit 7d590039f2
  1. 4
      libraries/liblmdb/mdb.c

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

Loading…
Cancel
Save