mdb_del must ignore data if db not opened with MDB_DUPSORT

vmware
Salvador Ortiz 11 years ago committed by Howard Chu
parent 1ac3c8308f
commit 335f0e4cee
  1. 4
      libraries/liblmdb/mdb.c

@ -7192,6 +7192,10 @@ mdb_del(MDB_txn *txn, MDB_dbi dbi,
mdb_cursor_init(&mc, txn, dbi, &mx); mdb_cursor_init(&mc, txn, dbi, &mx);
exact = 0; exact = 0;
if (!F_ISSET(txn->mt_dbs[dbi].md_flags, MDB_DUPSORT)) {
/* must ignore any data */
data = NULL;
}
if (data) { if (data) {
op = MDB_GET_BOTH; op = MDB_GET_BOTH;
rdata = *data; rdata = *data;

Loading…
Cancel
Save