Use mdb_page_loose() more

mdb.master3
Hallvard Furuseth 7 years ago committed by Howard Chu
parent 0e17ba43a8
commit 12ee1a2d71
  1. 4
      libraries/liblmdb/mdb.c

@ -9493,7 +9493,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_midl_append(&mc->mc_txn->mt_free_pgs, mp->mp_pgno); rc = mdb_page_loose(mc, mp);
if (rc) if (rc)
return rc; return rc;
/* Adjust cursors pointing to mp */ /* Adjust cursors pointing to mp */
@ -9521,7 +9521,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_midl_append(&mc->mc_txn->mt_free_pgs, mp->mp_pgno); rc = mdb_page_loose(mc, mp);
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