summaryrefslogtreecommitdiff
path: root/innobase/trx
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2003-01-12 22:31:16 +0200
committerunknown <heikki@hundin.mysql.fi>2003-01-12 22:31:16 +0200
commit4c1037ea372180b6df85b57c588d9cce8fc99737 (patch)
tree435041c74e59a51a0eaf1dcbe668fbe9b6881d7f /innobase/trx
parent8cd89cac498736b1145a14fcc79b1869f42c464a (diff)
downloadmariadb-git-4c1037ea372180b6df85b57c588d9cce8fc99737.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 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
Diffstat (limited to 'innobase/trx')
-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;