mdbx: disallow multi-opening without MDBX_DBG_LEGACY_MULTIOPEN.

Change-Id: I0e11d686954bd8c89dac9a46b4c5e17bc0dd6419
This commit is contained in:
Leonid Yuriev 2019-09-12 21:40:59 +03:00
parent c8928675c6
commit 4bcc1eef09

View File

@ -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;
}