mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-09 03:14:13 +08:00
mdbx: backport - fix handling MDBX_APPENDDUP mode.
Change-Id: I36de2a8dcab5126dab3857a7840ab3904a1d19c8
This commit is contained in:
parent
06c35dd59c
commit
fead1c3853
@ -7699,7 +7699,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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user