In APPEND don't immediately reject matching key, since this
is valid for APPENDDUP.
This commit is contained in:
Howard Chu 2013-04-04 07:25:21 -07:00
parent 6beaad5212
commit 8eef7a4275

View File

@ -4938,8 +4938,8 @@ mdb_cursor_put(MDB_cursor *mc, MDB_val *key, MDB_val *data,
if (rc > 0) { if (rc > 0) {
rc = MDB_NOTFOUND; rc = MDB_NOTFOUND;
mc->mc_ki[mc->mc_top]++; mc->mc_ki[mc->mc_top]++;
} else { } else if (rc < 0) {
/* new key is <= last key */ /* new key is < last key */
rc = MDB_KEYEXIST; rc = MDB_KEYEXIST;
} }
} }