mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 16:44:13 +08:00
check MDB_RESERVE against MDB_DUPSORT.
Change-Id: I7459a92ecea867a5fd6510c828ff65cd551a1e9a
This commit is contained in:
parent
b59f25fd46
commit
c17cff1d4e
5
mdb.c
5
mdb.c
@ -6543,6 +6543,11 @@ mdb_cursor_put(MDB_cursor *mc, MDB_val *key, MDB_val *data,
|
||||
return MDB_INCOMPATIBLE;
|
||||
}
|
||||
|
||||
if (flags & MDB_RESERVE) {
|
||||
if (unlikely(mc->mc_db->md_flags & (MDB_DUPSORT | MDB_REVERSEDUP)))
|
||||
return MDB_INCOMPATIBLE;
|
||||
}
|
||||
|
||||
nospill = flags & MDB_NOSPILL;
|
||||
flags &= ~MDB_NOSPILL;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user