From 335f0e4ceeed82a1302bf16cf2c3df00f45798c4 Mon Sep 17 00:00:00 2001 From: Salvador Ortiz Date: Fri, 9 Aug 2013 10:08:53 -0500 Subject: [PATCH] mdb_del must ignore data if db not opened with MDB_DUPSORT --- libraries/liblmdb/mdb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index ca7233466b..abc4a82dee 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -7192,6 +7192,10 @@ mdb_del(MDB_txn *txn, MDB_dbi dbi, mdb_cursor_init(&mc, txn, dbi, &mx); exact = 0; + if (!F_ISSET(txn->mt_dbs[dbi].md_flags, MDB_DUPSORT)) { + /* must ignore any data */ + data = NULL; + } if (data) { op = MDB_GET_BOTH; rdata = *data; -- 2.39.5