From: Howard Chu Date: Tue, 4 Oct 2011 01:02:17 +0000 (-0700) Subject: Don't use Append mode when splits are caused by sub-page inserts X-Git-Tag: OPENLDAP_REL_ENG_2_4_27~148^2~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=934a19553c058a799ddd27b1ae1e885e37d37a95;p=openldap Don't use Append mode when splits are caused by sub-page inserts Sub-pages need room to grow... --- diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 3a82192ce5..fb547ac222 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -4082,6 +4082,8 @@ new_sub: nflags = flags & NODE_ADD_FLAGS; nsize = IS_LEAF2(mc->mc_pg[mc->mc_top]) ? key->mv_size : mdb_leaf_size(mc->mc_txn->mt_env, key, rdata); if (SIZELEFT(mc->mc_pg[mc->mc_top]) < nsize) { + if (( flags & (F_DUPDATA|F_SUBDATA)) == F_DUPDATA ) + nflags &= ~MDB_APPEND; rc = mdb_page_split(mc, key, rdata, P_INVALID, nflags); } else { /* There is room already in this leaf page. */