]> git.sur5r.net Git - openldap/commitdiff
ITS#8190 fix cursor EOF bug
authorHoward Chu <hyc@openldap.org>
Tue, 7 Jul 2015 12:41:32 +0000 (13:41 +0100)
committerHoward Chu <hyc@openldap.org>
Tue, 28 Jul 2015 14:12:58 +0000 (15:12 +0100)
libraries/liblmdb/mdb.c

index 6bdf3151dcca23220157c1efa3caa2f562e61374..7129741e91d776154352cdf41912e26d6c2727f7 100644 (file)
@@ -5725,8 +5725,10 @@ set2:
 
        if (leaf == NULL) {
                DPUTS("===> inexact leaf not found, goto sibling");
-               if ((rc = mdb_cursor_sibling(mc, 1)) != MDB_SUCCESS)
+               if ((rc = mdb_cursor_sibling(mc, 1)) != MDB_SUCCESS) {
+                       mc->mc_flags |= C_EOF;
                        return rc;              /* no entries matched */
+               }
                mp = mc->mc_pg[mc->mc_top];
                mdb_cassert(mc, IS_LEAF(mp));
                leaf = NODEPTR(mp, 0);