]> git.sur5r.net Git - openldap/commitdiff
Update overflow page count when freeing overflow page
authorHoward Chu <hyc@symas.com>
Wed, 21 Mar 2012 00:14:59 +0000 (17:14 -0700)
committerHoward Chu <hyc@symas.com>
Wed, 21 Mar 2012 00:14:59 +0000 (17:14 -0700)
libraries/libmdb/mdb.c

index b714119c1069933f1e8b1254982cddca1e44e23f..25080f3f2174c9a7c4c0bcc09a4f725f98777ca6 100644 (file)
@@ -5399,6 +5399,7 @@ mdb_cursor_del0(MDB_cursor *mc, MDB_node *leaf)
 
                memcpy(&pg, NODEDATA(leaf), sizeof(pg));
                ovpages = OVPAGES(NODEDSZ(leaf), mc->mc_txn->mt_env->me_psize);
+               mc->mc_db->md_overflow_pages -= ovpages;
                for (i=0; i<ovpages; i++) {
                        DPRINTF("freed ov page %zu", pg);
                        mdb_midl_append(&mc->mc_txn->mt_free_pgs, pg);