From 18a07eb7c2dc33372455a6040984cd6b699b41a5 Mon Sep 17 00:00:00 2001 From: Claude Brisson Date: Thu, 5 Sep 2013 12:58:18 +0200 Subject: [PATCH] ITS#7681 fix mdb_cursor_set behaviour for MDB_SET_RANGE --- libraries/liblmdb/mdb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index dc20b4f..2b61adc 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; } }