From: Howard Chu Date: Wed, 26 Mar 2014 15:59:43 +0000 (-0700) Subject: ITS#7793/7828 X-Git-Tag: OPENLDAP_REL_ENG_2_4_40~132^2~18 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=13d6d59c512065db3741c20c65b4d9928b986968;p=openldap ITS#7793/7828 Fix md_entries count, test for insert on md_entries increment --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 487999abe0..4e9162f2e2 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -6157,7 +6157,6 @@ current: goto done; } mdb_node_del(mc, 0); - mc->mc_db->md_entries--; } rdata = data; @@ -6250,7 +6249,7 @@ put_sub: /* sub-writes might have failed so check rc again. * Don't increment count if we just replaced an existing item. */ - if (!rc && !(flags & MDB_CURRENT)) + if (!rc && insert) mc->mc_db->md_entries++; if (flags & MDB_MULTIPLE) { if (!rc) {