From: Howard Chu Date: Tue, 2 Apr 2013 03:34:40 +0000 (-0700) Subject: Fix rebalance when collapsing root page X-Git-Tag: OPENLDAP_REL_ENG_2_4_36~89^2~6 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e31d748dbe16b326fb2e80c1b876814cf7b24f45;p=openldap Fix rebalance when collapsing root page When fixing other cursors, must also fix their depth. --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 28f34522f7..2d06f3b75b 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -6341,6 +6341,8 @@ mdb_rebalance(MDB_cursor *mc) if (m3->mc_snum < mc->mc_snum) continue; if (m3->mc_pg[0] == mp) { m3->mc_pg[0] = mc->mc_pg[0]; + m3->mc_snum = 1; + m3->mc_top = 0; } } }