Make sure 2 subpages fit in one real page

vmware
Howard Chu 13 years ago
parent 237fabda64
commit 4272e7de4f
  1. 3
      libraries/libmdb/mdb.c

@ -3695,7 +3695,8 @@ top:
offset = NODESIZE + sizeof(indx_t) + data->mv_size;
}
offset += offset & 1;
if (NODEDSZ(leaf) + offset >= mc->mc_txn->mt_env->me_psize / MDB_MINKEYS) {
if (NODESIZE + NODEKSZ(leaf) + NODEDSZ(leaf) + offset >=
(mc->mc_txn->mt_env->me_psize - PAGEHDRSZ) / MDB_MINKEYS) {
/* yes, convert it */
dummy.md_flags = 0;
if (mc->mc_db->md_flags & MDB_DUPFIXED) {

Loading…
Cancel
Save