mdbx: fix handling MDBX_APPENDDUP mode.

Change-Id: I36de2a8dcab5126dab3857a7840ab3904a1d19c8
This commit is contained in:
Leonid Yuriev 2019-02-04 00:08:56 +03:00
parent 0639f54280
commit 49fa9b9c35

View File

@ -8300,7 +8300,7 @@ int mdbx_cursor_put(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
if (rc > 0) {
rc = MDBX_NOTFOUND;
mc->mc_ki[mc->mc_top]++;
} else {
} else if (unlikely(rc < 0 || (flags & MDBX_APPENDDUP) == 0)) {
/* new key is <= last key */
rc = MDBX_EKEYMISMATCH;
}