]> git.sur5r.net Git - openldap/commitdiff
Fix last delete from a subpage
authorHoward Chu <hyc@symas.com>
Mon, 19 Sep 2011 00:07:47 +0000 (17:07 -0700)
committerHoward Chu <hyc@symas.com>
Mon, 19 Sep 2011 00:07:47 +0000 (17:07 -0700)
libraries/libmdb/mdb.c

index 21d468b53ffa1300eeee68c7569507f864ce4ca5..6f279e3cb864a28d9157d4e9905227f6a07e26a4 100644 (file)
@@ -3843,7 +3843,7 @@ mdb_cursor_del(MDB_cursor *mc, unsigned int flags)
                        }
                        rc = mdb_cursor_del(&mc->mc_xcursor->mx_cursor, 0);
                        /* If sub-DB still has entries, we're done */
-                       if (mc->mc_xcursor->mx_db.md_root != P_INVALID) {
+                       if (mc->mc_xcursor->mx_db.md_entries) {
                                if (leaf->mn_flags & F_SUBDATA) {
                                        /* update subDB info */
                                        MDB_db *db = NODEDATA(leaf);