]> git.sur5r.net Git - openldap/commitdiff
ITS#7681 fix mdb_cursor_set behaviour for MDB_SET_RANGE
authorClaude Brisson <claude.brisson@gmail.com>
Thu, 5 Sep 2013 10:58:18 +0000 (12:58 +0200)
committerHoward Chu <hyc@symas.com>
Thu, 5 Sep 2013 12:57:03 +0000 (05:57 -0700)
libraries/liblmdb/mdb.c

index dc20b4fb5afe03bcdebafecebb33efe08ccf6530..2b61adc5c9df68b0f03fda83a0f4ec70a906a041 100644 (file)
@@ -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;
                }
        }