]> 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>
Sun, 6 Sep 2015 19:38:58 +0000 (20:38 +0100)
libraries/liblmdb/mdb.c

index 5fc4fbcce62d00ffc18878687b4dd24de3e5c699..4abf11a42b0beeb21e62c2d61a72f00272a19886 100644 (file)
@@ -8370,7 +8370,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;