Commit 6a1ee5fe authored by Howard Chu's avatar Howard Chu
Browse files

Fix f8ce8a82

GET_MULTIPLE was broken
parent 65b4c49d
...@@ -6345,10 +6345,9 @@ mdb_cursor_get(MDB_cursor *mc, MDB_val *key, MDB_val *data, ...@@ -6345,10 +6345,9 @@ mdb_cursor_get(MDB_cursor *mc, MDB_val *key, MDB_val *data,
rc = MDB_INCOMPATIBLE; rc = MDB_INCOMPATIBLE;
break; break;
} }
if (!(mc->mc_xcursor->mx_cursor.mc_flags & C_INITIALIZED)) { rc = MDB_SUCCESS;
rc = EINVAL; if (!(mc->mc_xcursor->mx_cursor.mc_flags & C_INITIALIZED))
break; break;
}
if (mc->mc_xcursor->mx_cursor.mc_flags & C_EOF) { if (mc->mc_xcursor->mx_cursor.mc_flags & C_EOF) {
MDB_cursor *mx = &mc->mc_xcursor->mx_cursor; MDB_cursor *mx = &mc->mc_xcursor->mx_cursor;
if (mx->mc_ki[mx->mc_top] >= NUMKEYS(mx->mc_pg[mx->mc_top])-1) { if (mx->mc_ki[mx->mc_top] >= NUMKEYS(mx->mc_pg[mx->mc_top])-1) {
...@@ -6357,7 +6356,6 @@ mdb_cursor_get(MDB_cursor *mc, MDB_val *key, MDB_val *data, ...@@ -6357,7 +6356,6 @@ mdb_cursor_get(MDB_cursor *mc, MDB_val *key, MDB_val *data,
} }
mx->mc_flags ^= C_EOF; mx->mc_flags ^= C_EOF;
} }
rc = MDB_SUCCESS;
goto fetchm; goto fetchm;
case MDB_NEXT_MULTIPLE: case MDB_NEXT_MULTIPLE:
if (data == NULL) { if (data == NULL) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment