diff options
author | unknown <osku@127.(none)> | 2005-08-12 11:39:19 +0300 |
---|---|---|
committer | unknown <osku@127.(none)> | 2005-08-12 11:39:19 +0300 |
commit | babc9f5d2bce17bfcbff2d4d1ab6b451059ab954 (patch) | |
tree | 21b7de1b8632c1f1729e35528e580de73fb20e60 /innobase/trx | |
parent | 5329be868e6dc44bd78e5b5540b37ee8cb204513 (diff) | |
download | mariadb-git-babc9f5d2bce17bfcbff2d4d1ab6b451059ab954.tar.gz |
InnoDB: Print more than 300 characters of queries in various error conditions,
most notably deadlocked ones in SHOW INNODB STATUS. Fixes bug #7819.
innobase/btr/btr0pcur.c:
Adapt to changes in trx_print.
innobase/include/trx0trx.h:
Add max_query_len parameter to trx_print.
innobase/lock/lock0lock.c:
Adapt to changes in trx_print.
innobase/row/row0ins.c:
Adapt to changes in trx_print.
innobase/row/row0sel.c:
Adapt to changes in trx_print.
innobase/row/row0umod.c:
Adapt to changes in trx_print.
innobase/row/row0upd.c:
Adapt to changes in trx_print.
innobase/srv/srv0srv.c:
Adapt to changes in trx_print.
innobase/trx/trx0trx.c:
Add max_query_len parameter to trx_print.
sql/ha_innodb.cc:
Add max_query_len parameter to innobase_mysql_print_thd.
Diffstat (limited to 'innobase/trx')
-rw-r--r-- | innobase/trx/trx0trx.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c index 1681bed9af2..078befb81d2 100644 --- a/innobase/trx/trx0trx.c +++ b/innobase/trx/trx0trx.c @@ -30,8 +30,9 @@ Created 3/26/1996 Heikki Tuuri copy MUST be equal to the one in mysql/sql/ha_innodb.cc ! */ void innobase_mysql_print_thd( - FILE* f, - void* thd); + FILE* f, + void* thd, + uint max_query_len); /* Dummy session used currently in MySQL interface */ sess_t* trx_dummy_sess = NULL; @@ -262,7 +263,7 @@ trx_free( fputs( " InnoDB: Error: Freeing a trx which is declared to be processing\n" "InnoDB: inside InnoDB.\n", stderr); - trx_print(stderr, trx); + trx_print(stderr, trx, 600); putc('\n', stderr); } @@ -277,7 +278,7 @@ trx_free( (ulong)trx->n_mysql_tables_in_use, (ulong)trx->mysql_n_tables_locked); - trx_print(stderr, trx); + trx_print(stderr, trx, 600); ut_print_buf(stderr, (byte*)trx, sizeof(trx_t)); } @@ -1651,16 +1652,18 @@ trx_mark_sql_stat_end( } /************************************************************************** -Prints info about a transaction to the standard output. The caller must -own the kernel mutex and must have called -innobase_mysql_prepare_print_arbitrary_thd(), unless he knows that MySQL or -InnoDB cannot meanwhile change the info printed here. */ +Prints info about a transaction to the given file. The caller must own the +kernel mutex and must have called +innobase_mysql_prepare_print_arbitrary_thd(), unless he knows that MySQL +or InnoDB cannot meanwhile change the info printed here. */ void trx_print( /*======*/ - FILE* f, /* in: output stream */ - trx_t* trx) /* in: transaction */ + FILE* f, /* in: output stream */ + trx_t* trx, /* in: transaction */ + uint max_query_len) /* in: max query length to print, or 0 to + use the default max length */ { ibool newline; @@ -1755,7 +1758,7 @@ trx_print( } if (trx->mysql_thd != NULL) { - innobase_mysql_print_thd(f, trx->mysql_thd); + innobase_mysql_print_thd(f, trx->mysql_thd, max_query_len); } } |