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