mdbx: fix assertion inside mdbx_suspend_threads_before_remap().

Change-Id: If01fc5f655922c55b3955f2b00c93b80328c5232
This commit is contained in:
Leo Yuriev 2018-07-19 08:48:50 +03:00
parent f425e98eb5
commit dfea68270a

View File

@ -253,7 +253,8 @@ int mdbx_suspend_threads_before_remap(MDBX_env *env,
} else {
/* Without LCK (i.e. read-only mode).
* Walk thougth a snapshot of all running threads */
mdbx_assert(env, env->me_txn0 == NULL);
mdbx_assert(env,
env->me_txn0 == NULL || (env->me_flags & MDBX_EXCLUSIVE) != 0);
const HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
if (hSnapshot == INVALID_HANDLE_VALUE)
return GetLastError();