mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
ITS#7229 additional tweaks
Should probably compare nsize to pg_size/4 instead...
This commit is contained in:
parent
de0cb27d70
commit
ae027b5214
@ -5711,7 +5711,7 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno
|
||||
}
|
||||
|
||||
nkeys = NUMKEYS(mp);
|
||||
split_indx = nkeys / 2 + 1;
|
||||
split_indx = (nkeys + 1) / 2;
|
||||
|
||||
if (IS_LEAF2(rp)) {
|
||||
char *split, *ins;
|
||||
@ -5765,7 +5765,7 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno
|
||||
* When the size of the data items is much smaller than
|
||||
* one-half of a page, this check is irrelevant.
|
||||
*/
|
||||
if (IS_LEAF(mp) && nkeys < 4) {
|
||||
if (IS_LEAF(mp) && nkeys < 16) {
|
||||
unsigned int psize, nsize;
|
||||
/* Maximum free space in an empty page */
|
||||
pmax = mc->mc_txn->mt_env->me_psize - PAGEHDRSZ;
|
||||
|
Loading…
Reference in New Issue
Block a user