mirror of
https://github.com/isar/libmdbx.git
synced 2025-04-04 04:02:57 +08:00
mdbx: исправление assert-проверки внутри check_txn()
для случая завершенных транзакций в режиме MDBX_NO_TLS
(backport).
По сообщению о проблеме https://t.me/libmdbx/5424
This commit is contained in:
parent
20160ae98f
commit
e515bd56e9
@ -9181,10 +9181,11 @@ static __always_inline int check_txn(const MDBX_txn *txn, int bad_bits) {
|
||||
if (unlikely(txn->mt_flags & bad_bits))
|
||||
return MDBX_BAD_TXN;
|
||||
|
||||
tASSERT(txn, (txn->mt_flags & MDBX_NOTLS) ==
|
||||
((txn->mt_flags & MDBX_TXN_RDONLY)
|
||||
? txn->mt_env->me_flags & MDBX_NOTLS
|
||||
: 0));
|
||||
tASSERT(txn, (txn->mt_flags & MDBX_TXN_FINISHED) ||
|
||||
(txn->mt_flags & MDBX_NOTLS) ==
|
||||
((txn->mt_flags & MDBX_TXN_RDONLY)
|
||||
? txn->mt_env->me_flags & MDBX_NOTLS
|
||||
: 0));
|
||||
#if MDBX_TXN_CHECKOWNER
|
||||
STATIC_ASSERT(MDBX_NOTLS > MDBX_TXN_FINISHED + MDBX_TXN_RDONLY);
|
||||
if (unlikely(txn->mt_owner != osal_thread_self()) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user