]> git.sur5r.net Git - openldap/commitdiff
ITS#8237 fix ITS#7589 regression
authorHoward Chu <hyc@openldap.org>
Sun, 6 Sep 2015 18:18:19 +0000 (19:18 +0100)
committerHoward Chu <hyc@openldap.org>
Sat, 12 Sep 2015 22:07:16 +0000 (23:07 +0100)
libraries/liblmdb/mdb.c

index 087f19837b5ea1f15523373c4c5c017216f828c6..4e93abcad4b40b46924330402479796dcd7c39f0 100644 (file)
@@ -8167,7 +8167,7 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno
                                psize = 0;
                                if (newindx <= split_indx || newindx >= nkeys) {
                                        i = 0; j = 1;
-                                       k = newindx >= nkeys ? nkeys : split_indx+2;
+                                       k = newindx >= nkeys ? nkeys : split_indx+1+IS_LEAF(mp);
                                } else {
                                        i = nkeys; j = -1;
                                        k = split_indx-1;