From: Howard Chu Date: Thu, 4 Apr 2013 14:25:21 +0000 (-0700) Subject: Fix 6beaad52129da5353fd40c0ec48e6a78c4f71a2e X-Git-Tag: OPENLDAP_REL_ENG_2_4_36~89^2~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8eef7a4275eda8f2fa2e0d1e67c1d5cbcd91607e;p=openldap Fix 6beaad52129da5353fd40c0ec48e6a78c4f71a2e In APPEND don't immediately reject matching key, since this is valid for APPENDDUP. --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 513706d83e..4b79e154ef 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -4938,8 +4938,8 @@ mdb_cursor_put(MDB_cursor *mc, MDB_val *key, MDB_val *data, if (rc > 0) { rc = MDB_NOTFOUND; mc->mc_ki[mc->mc_top]++; - } else { - /* new key is <= last key */ + } else if (rc < 0) { + /* new key is < last key */ rc = MDB_KEYEXIST; } }