From 4fcbaa44f3c94b906b47504855a06cfa14dc4170 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Tue, 8 Dec 2015 16:43:55 +0100 Subject: [PATCH] mdbx: backport - ITS#8334 Fix MDB_APPENDDUP vs. rewrite(single item). Change-Id: I7742bd2e75ef670dac31a46d270a96ee28c20639 --- mdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdb.c b/mdb.c index 69d4c5d1..1503d41a 100644 --- a/mdb.c +++ b/mdb.c @@ -6640,7 +6640,7 @@ more: /* does data match? */ if (!mc->mc_dbx->md_dcmp(data, &olddata)) { - if (unlikely(flags & MDB_NODUPDATA)) + if (unlikely(flags & (MDB_NODUPDATA|MDB_APPENDDUP))) return MDB_KEYEXIST; /* overwrite it */ goto current;