diff options
Diffstat (limited to 'innobase/trx/trx0trx.c')
-rw-r--r-- | innobase/trx/trx0trx.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c index f0077f941de..5ac49397c90 100644 --- a/innobase/trx/trx0trx.c +++ b/innobase/trx/trx0trx.c @@ -233,8 +233,19 @@ trx_free( /*=====*/ trx_t* trx) /* in, own: trx object */ { + char err_buf[1000]; + ut_ad(mutex_own(&kernel_mutex)); + if (trx->declared_to_be_inside_innodb) { + ut_print_timestamp(stderr); + trx_print(err_buf, trx); + + fprintf(stderr, +" InnoDB: Error: Freeing a trx which is declared to be processing\n" +"InnoDB: inside InnoDB.\n%s\n", err_buf); + } + ut_a(trx->magic_n == TRX_MAGIC_N); trx->magic_n = 11112222; @@ -1506,10 +1517,10 @@ trx_print( #ifdef UNIV_LINUX buf += sprintf(buf, ", process no %lu", trx->mysql_process_no); -#else +#endif buf += sprintf(buf, ", OS thread id %lu", os_thread_pf(trx->mysql_thread_id)); -#endif + if (ut_strlen(trx->op_info) > 0) { buf += sprintf(buf, " %s", trx->op_info); } @@ -1518,6 +1529,11 @@ trx_print( buf += sprintf(buf, " purge trx"); } + if (trx->declared_to_be_inside_innodb) { + buf += sprintf(buf, ", thread declared inside InnoDB %lu", + trx->n_tickets_to_enter_innodb); + } + buf += sprintf(buf, "\n"); start_of_line = buf; |