mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Added new states to be able to better diagnose where server hangs.
- Table locks now ends with state "After table lock" - Open table now ends with state "After opening tables" - All calls to close_thread_tables(), not only from mysql_execute_command(), has state "closing tables" - Added state "executing" for mysql admin commands, like CACHE INDEX, REPAIR TABLE etc. - Added state "Finding key cache" for CACHE INDEX - Added state "Filling schema table" when we generate temporary table for SHOW commands and information schema. Other things: Add limit from innobase for thread_sleep_delay. This fixed a failing tests case. Added db.opt to support-files to make 'make package' work mysql-test/suite/funcs_1/datadict/processlist_val.inc: Use new state mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result: Updated test result because of new state mysql-test/suite/funcs_1/r/processlist_val_no_prot.result: Updated test result because of new state sql/CMakeLists.txt: Have option files in support-files sql/lock.cc: Added new state 'After table lock' sql/sql_admin.cc: Added state "executing" and "Sending data" for mysql admin commands, like CACHE INDEX, REPAIR TABLE etc. Added state "Finding key cache" sql/sql_base.cc: open tables now ends with state "After table lock", instead of NULL sql/sql_parse.cc: Moved state "closing tables" to close_thread_tables() sql/sql_show.cc: Added state "Filling schema table" when we generate temporary table for SHOW commands and information schema. storage/xtradb/buf/buf0buf.c: Removed compiler warning storage/xtradb/handler/ha_innodb.cc: Add limit from innobase for thread_sleep_delay. This fixed a failing tests case. support-files/db.opt: cmakes needs this to create data/test directory
This commit is contained in:
@ -1467,6 +1467,8 @@ void close_thread_tables(THD *thd)
|
||||
TABLE *table;
|
||||
DBUG_ENTER("close_thread_tables");
|
||||
|
||||
thd_proc_info(thd, "closing tables");
|
||||
|
||||
#ifdef EXTRA_DEBUG
|
||||
DBUG_PRINT("tcache", ("open tables:"));
|
||||
for (table= thd->open_tables; table; table= table->next)
|
||||
@ -5170,7 +5172,7 @@ restart:
|
||||
}
|
||||
|
||||
err:
|
||||
thd_proc_info(thd, 0);
|
||||
thd_proc_info(thd, "After opening tables");
|
||||
free_root(&new_frm_mem, MYF(0)); // Free pre-alloced block
|
||||
|
||||
if (error && *table_to_open)
|
||||
@ -5619,7 +5621,7 @@ end:
|
||||
trans_rollback_stmt(thd);
|
||||
close_thread_tables(thd);
|
||||
}
|
||||
thd_proc_info(thd, 0);
|
||||
thd_proc_info(thd, "After opening table");
|
||||
DBUG_RETURN(table);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user