From: Howard Chu Date: Mon, 19 Sep 2011 00:07:47 +0000 (-0700) Subject: Fix last delete from a subpage X-Git-Tag: OPENLDAP_REL_ENG_2_4_27~148^2~23 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=237fabda645410996abc7d1285cf4a1b66ac298b;p=openldap Fix last delete from a subpage --- diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 21d468b53f..6f279e3cb8 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -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);