ITS#8334 Fix MDB_APPENDDUP vs. rewrite(single item)
authorHallvard Furuseth <hallvard@openldap.org>
Tue, 8 Dec 2015 15:43:55 +0000 (16:43 +0100)
committerHallvard Furuseth <hallvard@openldap.org>
Tue, 8 Dec 2015 15:43:55 +0000 (16:43 +0100)
libraries/liblmdb/mdb.c

index 09f1509..0c93c37 100644 (file)
@@ -6642,7 +6642,7 @@ more:
 #endif
                                /* does data match? */
                                if (!dcmp(data, &olddata)) {
-                                       if (flags & MDB_NODUPDATA)
+                                       if (flags & (MDB_NODUPDATA|MDB_APPENDDUP))
                                                return MDB_KEYEXIST;
                                        /* overwrite it */
                                        goto current;