summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorheikki@hundin.mysql.fi <>2003-01-12 22:31:16 +0200
committerheikki@hundin.mysql.fi <>2003-01-12 22:31:16 +0200
commitc314981049cfb54f8ea256634a97f4a60d16c591 (patch)
tree435041c74e59a51a0eaf1dcbe668fbe9b6881d7f /innobase
parent0928c8b4b4bbe8acd7a6e7199b4e9a73e9f0ed47 (diff)
downloadmariadb-git-c314981049cfb54f8ea256634a97f4a60d16c591.tar.gz
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
Diffstat (limited to 'innobase')
-rw-r--r--innobase/trx/trx0trx.c16
1 files changed, 16 insertions, 0 deletions
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;