mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:24:13 +08:00
mdbx: fix MDB_CURRENT for mdb_cursor_put() with MDB_DUPSORT.
This commit is contained in:
parent
6aa60c61c5
commit
cc6e1c5119
5
mdb.c
5
mdb.c
@ -6902,8 +6902,11 @@ more:
|
||||
/* Was a single item before, must convert now */
|
||||
if (!F_ISSET(leaf->mn_flags, F_DUPDATA)) {
|
||||
/* Just overwrite the current item */
|
||||
if (flags == MDB_CURRENT)
|
||||
if (flags & MDB_CURRENT) {
|
||||
if ((flags & MDB_NODUPDATA) && !mc->mc_dbx->md_dcmp(data, &olddata))
|
||||
return MDB_KEYEXIST;
|
||||
goto current;
|
||||
}
|
||||
|
||||
/* does data match? */
|
||||
if (!mc->mc_dbx->md_dcmp(data, &olddata)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user