Skip to content

Commit 8143ef1

Browse files
committed
trx_validate_state_before_free(): Add debug assertions
1 parent bb60a83 commit 8143ef1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

storage/innobase/trx/trx0trx.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,10 @@ static
548548
void
549549
trx_validate_state_before_free(trx_t* trx)
550550
{
551+
ut_ad(!trx->declared_to_be_inside_innodb);
552+
ut_ad(!trx->n_mysql_tables_in_use);
553+
ut_ad(!trx->mysql_n_tables_locked);
554+
551555
if (trx->declared_to_be_inside_innodb) {
552556

553557
ib::error() << "Freeing a trx (" << trx << ", "
@@ -558,7 +562,7 @@ trx_validate_state_before_free(trx_t* trx)
558562
putc('\n', stderr);
559563

560564
/* This is an error but not a fatal error. We must keep
561-
the counters like srv_conc_n_threads accurate. */
565+
the counters like srv_conc.n_active accurate. */
562566
srv_conc_force_exit_innodb(trx);
563567
}
564568

0 commit comments

Comments
 (0)