diff options
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r-- | sql/mysqld.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index d310d8dcf9b..d0fbaa8f589 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1538,6 +1538,8 @@ static my_bool kill_thread_phase_1(THD *thd, int *n_threads_awaiting_ack) if (DBUG_EVALUATE_IF("only_kill_system_threads", !thd->system_thread, 0)) return 0; + if (DBUG_EVALUATE_IF("only_kill_system_threads_no_loop", !thd->system_thread, 0)) + return 0; thd->awake(KILL_SERVER_HARD); return 0; } @@ -1747,7 +1749,6 @@ static void close_connections(void) Events::deinit(); slave_prepare_for_shutdown(); - mysql_bin_log.stop_background_thread(); ack_receiver.stop(); /* @@ -1768,7 +1769,8 @@ static void close_connections(void) for (int i= 0; (THD_count::value() - binlog_dump_thread_count - n_threads_awaiting_ack) && - i < 1000; + i < 1000 && + DBUG_EVALUATE_IF("only_kill_system_threads_no_loop", 0, 1); i++) my_sleep(20000); @@ -1787,9 +1789,12 @@ static void close_connections(void) THD_count::value() - binlog_dump_thread_count - n_threads_awaiting_ack)); - while (THD_count::value() - binlog_dump_thread_count - - n_threads_awaiting_ack) + while ((THD_count::value() - binlog_dump_thread_count - + n_threads_awaiting_ack) && + DBUG_EVALUATE_IF("only_kill_system_threads_no_loop", 0, 1)) + { my_sleep(1000); + } /* Kill phase 2 */ server_threads.iterate(kill_thread_phase_2); |