mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-20 05:18:21 +08:00
mdbx: disallow multi-opening without MDBX_DBG_LEGACY_MULTIOPEN.
Change-Id: I0e11d686954bd8c89dac9a46b4c5e17bc0dd6419
This commit is contained in:
parent
c8928675c6
commit
4bcc1eef09
@ -6747,7 +6747,9 @@ static int __cold mdbx_setup_lck(MDBX_env *env, char *lck_pathname,
|
||||
err = uniq_check(&env->me_lck_mmap, &inprocess_neighbor);
|
||||
if (MDBX_IS_ERROR(err))
|
||||
goto bailout;
|
||||
if (inprocess_neighbor && (inprocess_neighbor->me_flags & MDBX_EXCLUSIVE)) {
|
||||
if (inprocess_neighbor &&
|
||||
((mdbx_runtime_flags & MDBX_DBG_LEGACY_MULTIOPEN) == 0 ||
|
||||
(inprocess_neighbor->me_flags & MDBX_EXCLUSIVE) != 0)) {
|
||||
err = MDBX_BUSY;
|
||||
goto bailout;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user