]> git.sur5r.net Git - openldap/blobdiff - libraries/libmdb/mdb.c
Merge remote branch 'mdb/mdb.master'
[openldap] / libraries / libmdb / mdb.c
index bf09af860ce13ad8f367234a4e9f66c77aea6c66..73d3eaa290bb6865e3be9895f2c2a9dcdfab8c58 100644 (file)
@@ -2577,6 +2577,19 @@ set1:
                                        rc = 0;
                                        goto set2;
                                }
+                               rc = cursor->mc_txn->mt_dbxs[cursor->mc_dbi].md_cmp(key, &nodekey);
+                               if (rc <= 0) goto set1;
+                       }
+                       /* If any parents have right-sibs, search.
+                        * Otherwise, there's nothing further.
+                        */
+                       for (i=0; i<cursor->mc_snum-1; i++)
+                               if (cursor->mc_stack[i].mp_ki <
+                                       NUMKEYS(cursor->mc_stack[i].mp_page)-1)
+                                       break;
+                       if (i == cursor->mc_snum - 1) {
+                               /* There are no other pages */
+                               goto set1;
                        }
                        /* If any parents have right-sibs, search.
                         * Otherwise, there's nothing further.