From 4c1037ea372180b6df85b57c588d9cce8fc99737 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 12 Jan 2003 22:31:16 +0200 Subject: trx0trx.c: Add diagnostic prints to determine why the 'queries inside InnoDB' might drift upwards ha_innodb.cc: Add more print space to SHOW INNODB STATUS; remove possible memory leak in case there is an error sql/ha_innodb.cc: Add more print space to SHOW INNODB STATUS; remove possible memory leak in case there is an error innobase/trx/trx0trx.c: Add diagnostic prints to determine why the 'queries inside InnoDB' might drift upwards --- innobase/trx/trx0trx.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'innobase/trx') diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c index d2219ed019f..357fb01df63 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; @@ -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; -- cgit v1.2.1