Commit b3f103bc authored by unknown's avatar unknown

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

into sinisa.nasamreza.org:/mnt/work/mysql-4.0
parents fce972fe a55ce6de
......@@ -1715,6 +1715,7 @@ srv_conc_enter_innodb(
ibool has_slept = FALSE;
srv_conc_slot_t* slot;
ulint i;
char err_buf[1000];
if (srv_thread_concurrency >= 500) {
/* Disable the concurrency check */
......@@ -1733,6 +1734,16 @@ srv_conc_enter_innodb(
retry:
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) {
srv_conc_n_threads++;
......
......@@ -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;
......
......@@ -101,6 +101,12 @@ EXPORTS
mysql_rpl_probe
mysql_set_master
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(
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 */
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;
field_list.push_back(new Item_empty_string("Status", strlen(buf)));
if(send_fields(thd, field_list, 1)) {
ut_free(buf);
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