]> git.sur5r.net Git - openldap/commitdiff
Fix rebalance when collapsing root page
authorHoward Chu <hyc@symas.com>
Tue, 2 Apr 2013 03:34:40 +0000 (20:34 -0700)
committerHoward Chu <hyc@symas.com>
Tue, 2 Apr 2013 03:34:40 +0000 (20:34 -0700)
When fixing other cursors, must also fix their depth.

libraries/liblmdb/mdb.c

index 28f34522f7cac11924444b64ed6d149b707f20e3..2d06f3b75bd6fbb15bcfb8eefdc4be82bcec659e 100644 (file)
@@ -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;
                                        }
                                }
                        }