mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 17:34:14 +08:00
mdbx: minor fix for MDBX_DBG_LEGACY_MULTIOPEN.
Change-Id: I7d1c30699708c4b9e47e1b781e96c9a4b6c2b109
This commit is contained in:
parent
ffa10a25d6
commit
17380fe079
10
src/core.c
10
src/core.c
@ -6080,8 +6080,14 @@ static int mdbx_txn_renew0(MDBX_txn *txn, const unsigned flags) {
|
||||
mdbx_assert(env, !(env->me_flags & MDBX_NOTLS));
|
||||
r = thread_rthc_get(env->me_txkey);
|
||||
if (likely(r)) {
|
||||
mdbx_assert(env, r->mr_pid == env->me_pid);
|
||||
mdbx_assert(env, r->mr_tid == mdbx_thread_self());
|
||||
if (unlikely(!r->mr_pid) &&
|
||||
(mdbx_runtime_flags & MDBX_DBG_LEGACY_MULTIOPEN)) {
|
||||
thread_rthc_set(env->me_txkey, nullptr);
|
||||
r = nullptr;
|
||||
} else {
|
||||
mdbx_assert(env, r->mr_pid == env->me_pid);
|
||||
mdbx_assert(env, r->mr_tid == mdbx_thread_self());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mdbx_assert(env, !env->me_lck || (env->me_flags & MDBX_NOTLS));
|
||||
|
Loading…
x
Reference in New Issue
Block a user