]> git.sur5r.net Git - openldap/commitdiff
ITS#8316 more for 60c34d14ec3ceb0762d620eef77db73dd1e911dc
authorHoward Chu <hyc@openldap.org>
Sat, 21 Nov 2015 17:58:49 +0000 (17:58 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 23 Nov 2015 01:40:01 +0000 (01:40 +0000)
libraries/liblmdb/mdb.c

index 7f896daa09980b0739d45552cf084f0c778807be..1f12db3947822ebd683f6fbeaf378adda0a772b1 100644 (file)
@@ -7979,7 +7979,8 @@ mdb_page_merge(MDB_cursor *csrc, MDB_cursor *cdst)
                                m3->mc_pg[top] = pdst;
                                m3->mc_ki[top] += nkeys;
                                m3->mc_ki[top-1] = cdst->mc_ki[top-1];
-                       } else if (m3->mc_ki[top-1] > csrc->mc_ki[top-1]) {
+                       } else if (m3->mc_pg[top-1] == csrc->mc_pg[top-1] &&
+                               m3->mc_ki[top-1] > csrc->mc_ki[top-1]) {
                                m3->mc_ki[top-1]--;
                        }
                }