mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-30 11:29:19 +08:00
mdbx: check txn inside mdbx_cursor_renew().
Change-Id: I444ff36739d875dda835e8ded7a7aae37c8bd2be
This commit is contained in:
parent
c4007cbc70
commit
8a08df9188
@ -8086,7 +8086,10 @@ int mdbx_cursor_renew(MDBX_txn *txn, MDBX_cursor *mc) {
|
||||
return MDBX_EBADSIGN;
|
||||
|
||||
if (unlikely(txn->mt_owner != mdbx_thread_self()))
|
||||
return MDBX_THREAD_MISMATCH;
|
||||
return txn->mt_owner ? MDBX_THREAD_MISMATCH : MDBX_BAD_TXN;
|
||||
|
||||
if (unlikely(txn->mt_flags & (MDBX_TXN_FINISHED | MDBX_TXN_ERROR)))
|
||||
return MDBX_BAD_TXN;
|
||||
|
||||
if (unlikely(mc->mc_signature != MDBX_MC_SIGNATURE &&
|
||||
mc->mc_signature != MDBX_MC_READY4CLOSE))
|
||||
|
Loading…
Reference in New Issue
Block a user