From: Howard Chu Date: Thu, 12 Jan 2017 13:35:31 +0000 (+0000) Subject: Fix f8ce8a82717ddefdc912fa47c07f1bdee2a3336b X-Git-Tag: LMDB_0.9.21~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6a1ee5feec7ed52f1ab60efc0e14f81b6d81ea74;p=openldap Fix f8ce8a82717ddefdc912fa47c07f1bdee2a3336b GET_MULTIPLE was broken --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index fdc36bf1cb..2c34383461 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -6345,10 +6345,9 @@ mdb_cursor_get(MDB_cursor *mc, MDB_val *key, MDB_val *data, rc = MDB_INCOMPATIBLE; break; } - if (!(mc->mc_xcursor->mx_cursor.mc_flags & C_INITIALIZED)) { - rc = EINVAL; + rc = MDB_SUCCESS; + if (!(mc->mc_xcursor->mx_cursor.mc_flags & C_INITIALIZED)) 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) { @@ -6357,7 +6356,6 @@ mdb_cursor_get(MDB_cursor *mc, MDB_val *key, MDB_val *data, } mx->mc_flags ^= C_EOF; } - rc = MDB_SUCCESS; goto fetchm; case MDB_NEXT_MULTIPLE: if (data == NULL) {