]> git.sur5r.net Git - openldap/commitdiff
More for 48ef27b6f5c804eca6a9d27f8dd2b4ded376f8af
authorHoward Chu <hyc@symas.com>
Mon, 17 Sep 2012 14:02:41 +0000 (07:02 -0700)
committerHoward Chu <hyc@symas.com>
Mon, 17 Sep 2012 14:02:41 +0000 (07:02 -0700)
page_split with newindex > split_indx

libraries/libmdb/mdb.c

index 533ec7b4a8687b4306b8546368ecd2376fe63a47..2c54cbd2e587af27691c93bef7b04fd4f113d629 100644 (file)
@@ -6128,9 +6128,10 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno
                                                psize += NODEDSZ(node);
                                        psize += psize & 1;
                                        if (psize > pmax) {
-                                               if (i >= newindx)
+                                               if (i >= newindx) {
                                                        split_indx = newindx;
-                                               else
+                                                       newpos = 0;
+                                               } else
                                                        split_indx = i+1;
                                                break;
                                        }