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
parent 0928c8b4
......@@ -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;
......
......@@ -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