diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index 98525d9302f..d5f7c64458d 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -257,6 +257,9 @@ struct TrxFactory { trx->dict_operation_lock_mode = 0; + trx->in_innodb = 0; + trx->in_depth = 0; + trx->xid = ut::new_withkey(UT_NEW_THIS_FILE_PSI_KEY); trx->detailed_error = reinterpret_cast( @@ -491,6 +494,8 @@ static void trx_free(trx_t *&trx) { ut_ad(trx->read_view == nullptr); ut_ad(trx->is_dd_trx == false); + ut_a(trx->in_innodb == 0); + ut_a(trx->in_depth == 0); /* trx locking state should have been reset before returning trx to pool */