diff options
author | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-09-16 16:16:29 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-09-16 16:16:29 +0200 |
commit | a51a4b104c3489ab13413825af792f6abe6913d3 (patch) | |
tree | a9490488cf7956244265ad6be4838ba6063123c7 /sql | |
parent | be2061c0517af34a482b08af93e5040115d87c7b (diff) | |
parent | 623863fdc7a392ada9f396f29cf3ad1bc440a3e7 (diff) | |
download | mariadb-git-a51a4b104c3489ab13413825af792f6abe6913d3.tar.gz |
Merge from mysql-5.5-bugfixing to mysql-5.5-runtime.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysqld.cc | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 840616e0e7c..af98ed91adf 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1395,6 +1395,12 @@ static void mysqld_exit(int exit_code) mysql_audit_finalize(); clean_up_mutexes(); clean_up_error_log_mutex(); +#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE + /* + Bug#56666 needs to be fixed before calling: + shutdown_performance_schema(); + */ +#endif my_end(opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0); exit(exit_code); /* purecov: inspected */ } @@ -2733,6 +2739,11 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused))) if (!abort_loop) { abort_loop=1; // mark abort for threads +#ifdef HAVE_PSI_INTERFACE + /* Delete the instrumentation for the signal thread */ + if (likely(PSI_server != NULL)) + PSI_server->delete_current_thread(); +#endif #ifdef USE_ONE_SIGNAL_HAND pthread_t tmp; if (mysql_thread_create(0, /* Not instrumented */ @@ -4588,6 +4599,15 @@ int mysqld_main(int argc, char **argv) #endif #endif /* __WIN__ */ +#ifdef HAVE_PSI_INTERFACE + /* + Disable the main thread instrumentation, + to avoid recording events during the shutdown. + */ + if (PSI_server) + PSI_server->delete_current_thread(); +#endif + /* Wait until cleanup is done */ mysql_mutex_lock(&LOCK_thread_count); while (!ready_to_exit) @@ -4605,18 +4625,6 @@ int mysqld_main(int argc, char **argv) } #endif clean_up(1); -#ifdef HAVE_PSI_INTERFACE - /* - Disable the instrumentation, to avoid recording events - during the shutdown. - */ - if (PSI_server) - { - PSI_server->delete_current_thread(); - PSI_server= NULL; - } - shutdown_performance_schema(); -#endif mysqld_exit(0); } |