From edb6d2d661f86f82c1822d7d7965b72744261b3e Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Sat, 30 Jan 2021 18:08:45 +0300 Subject: [PATCH] mdbx: add audit after nested txn start. Change-Id: I7601994d24e7d2a5b8e9b113f697e4a14b1d2e6a --- src/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core.c b/src/core.c index 555aa00e..36e6cf0a 100644 --- a/src/core.c +++ b/src/core.c @@ -7211,6 +7211,10 @@ int mdbx_txn_begin_ex(MDBX_env *env, MDBX_txn *parent, MDBX_txn_flags_t flags, assert(txn->tw.dirtyroom <= txn->mt_env->me_options.dp_limit); env->me_txn = txn; rc = mdbx_cursor_shadow(parent, txn); + if (mdbx_audit_enabled() && mdbx_assert_enabled()) { + txn->mt_signature = MDBX_MT_SIGNATURE; + mdbx_tassert(txn, mdbx_audit_ex(txn, 0, false) == 0); + } if (unlikely(rc != MDBX_SUCCESS)) mdbx_txn_end(txn, MDBX_END_FAIL_BEGINCHILD); } else { /* MDBX_TXN_RDONLY */