Commit 9796fe70 authored by Sinisa@sinisa.nasamreza.org's avatar Sinisa@sinisa.nasamreza.org

Merge sinisa@work.mysql.com:/home/bk/mysql-4.0

into sinisa.nasamreza.org:/mnt/work/mysql-4.0
parents 6b386c08 40689f64
...@@ -1715,6 +1715,7 @@ srv_conc_enter_innodb( ...@@ -1715,6 +1715,7 @@ srv_conc_enter_innodb(
ibool has_slept = FALSE; ibool has_slept = FALSE;
srv_conc_slot_t* slot; srv_conc_slot_t* slot;
ulint i; ulint i;
char err_buf[1000];
if (srv_thread_concurrency >= 500) { if (srv_thread_concurrency >= 500) {
/* Disable the concurrency check */ /* Disable the concurrency check */
...@@ -1733,6 +1734,16 @@ srv_conc_enter_innodb( ...@@ -1733,6 +1734,16 @@ srv_conc_enter_innodb(
retry: retry:
os_fast_mutex_lock(&srv_conc_mutex); os_fast_mutex_lock(&srv_conc_mutex);
if (trx->declared_to_be_inside_innodb) {
ut_print_timestamp(stderr);
trx_print(err_buf, trx);
fprintf(stderr,
" InnoDB: Error: trying to declare trx to enter InnoDB, but\n"
"InnoDB: it already is declared.\n%s\n", err_buf);
}
if (srv_conc_n_threads < (lint)srv_thread_concurrency) { if (srv_conc_n_threads < (lint)srv_thread_concurrency) {
srv_conc_n_threads++; srv_conc_n_threads++;
......
...@@ -233,8 +233,19 @@ trx_free( ...@@ -233,8 +233,19 @@ trx_free(
/*=====*/ /*=====*/
trx_t* trx) /* in, own: trx object */ trx_t* trx) /* in, own: trx object */
{ {
char err_buf[1000];
ut_ad(mutex_own(&kernel_mutex)); 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); ut_a(trx->magic_n == TRX_MAGIC_N);
trx->magic_n = 11112222; trx->magic_n = 11112222;
...@@ -1518,6 +1529,11 @@ trx_print( ...@@ -1518,6 +1529,11 @@ trx_print(
buf += sprintf(buf, " purge trx"); 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"); buf += sprintf(buf, "\n");
start_of_line = buf; start_of_line = buf;
......
...@@ -101,6 +101,12 @@ EXPORTS ...@@ -101,6 +101,12 @@ EXPORTS
mysql_rpl_probe mysql_rpl_probe
mysql_set_master mysql_set_master
mysql_add_slave mysql_add_slave
my_getopt_print_errors
handle_options
my_print_help
my_print_variables
getopt_ull_limit_value
getopt_compare_strings
......
...@@ -3938,18 +3938,21 @@ innodb_show_status( ...@@ -3938,18 +3938,21 @@ innodb_show_status(
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
/* We let the InnoDB Monitor to output at most 100 kB of text, add /* We let the InnoDB Monitor to output at most 200 kB of text, add
a safety margin of 10 kB for buffer overruns */ a safety margin of 10 kB for buffer overruns */
buf = (char*)ut_malloc(110 * 1024); buf = (char*)ut_malloc(210 * 1024);
srv_sprintf_innodb_monitor(buf, 100 * 1024); srv_sprintf_innodb_monitor(buf, 200 * 1024);
List<Item> field_list; List<Item> field_list;
field_list.push_back(new Item_empty_string("Status", strlen(buf))); field_list.push_back(new Item_empty_string("Status", strlen(buf)));
if(send_fields(thd, field_list, 1)) { if(send_fields(thd, field_list, 1)) {
ut_free(buf);
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment