]> git.sur5r.net Git - openldap/commitdiff
mdb_del must ignore data if db not opened with MDB_DUPSORT
authorSalvador Ortiz <sog@msg.com.mx>
Fri, 9 Aug 2013 15:08:53 +0000 (10:08 -0500)
committerHoward Chu <hyc@symas.com>
Fri, 9 Aug 2013 16:05:44 +0000 (09:05 -0700)
libraries/liblmdb/mdb.c

index ca7233466b52992f8b05caabeb40316e4f443629..abc4a82deeb9e17f713e2841fd35ecbc53c1d560 100644 (file)
@@ -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;