From: Claude Brisson Date: Thu, 5 Sep 2013 10:58:18 +0000 (+0200) Subject: ITS#7681 fix mdb_cursor_set behaviour for MDB_SET_RANGE X-Git-Tag: OPENLDAP_REL_ENG_2_4_37~39^2~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=18a07eb7c2dc33372455a6040984cd6b699b41a5;p=openldap ITS#7681 fix mdb_cursor_set behaviour for MDB_SET_RANGE --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index dc20b4fb5a..2b61adc5c9 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -5227,7 +5227,10 @@ mdb_cursor_set(MDB_cursor *mc, MDB_val *key, MDB_val *data, if (!mc->mc_top) { /* There are no other pages */ mc->mc_ki[mc->mc_top] = 0; - return MDB_NOTFOUND; + if (op == MDB_SET_RANGE) + goto set1; + else + return MDB_NOTFOUND; } }