]> git.sur5r.net Git - openldap/commitdiff
Further fix f8ce8a82717ddefdc912fa47c07f1bdee2a3336b
authorHoward Chu <hyc@openldap.org>
Sat, 14 Jan 2017 19:22:34 +0000 (19:22 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 14 Jan 2017 19:22:34 +0000 (19:22 +0000)
Fully revert the change to GET_MULTIPLE

libraries/liblmdb/mdb.c

index 649ff0103584a91a001504915d4d1f6e4b9a28d5..82bac14bbbcc677f19cfe43744fb91c5763c1a5c 100644 (file)
@@ -7131,16 +7131,9 @@ mdb_cursor_get(MDB_cursor *mc, MDB_val *key, MDB_val *data,
                        break;
                }
                rc = MDB_SUCCESS;
-               if (!(mc->mc_xcursor->mx_cursor.mc_flags & C_INITIALIZED))
+               if (!(mc->mc_xcursor->mx_cursor.mc_flags & C_INITIALIZED) ||
+                       (mc->mc_xcursor->mx_cursor.mc_flags & C_EOF))
                        break;
-               if (mc->mc_xcursor->mx_cursor.mc_flags & C_EOF) {
-                       MDB_cursor *mx = &mc->mc_xcursor->mx_cursor;
-                       if (mx->mc_ki[mx->mc_top] >= NUMKEYS(mx->mc_pg[mx->mc_top])-1) {
-                               rc = MDB_NOTFOUND;
-                               break;
-                       }
-                       mx->mc_flags ^= C_EOF;
-               }
                goto fetchm;
        case MDB_NEXT_MULTIPLE:
                if (data == NULL) {