diff options
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 3 | ||||
-rw-r--r-- | mysql-test/suite/rpl/include/rpl_shutdown_wait_slaves.inc | 1 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_shutdown_wait_semisync_slaves.result | 1 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_shutdown_wait_slaves.result | 1 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_shutdown_wait_semisync_slaves.cnf | 1 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_shutdown_wait_slaves.cnf | 1 | ||||
-rw-r--r-- | sql/mysqld.cc | 38 |
7 files changed, 17 insertions, 29 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 56e265d9eef..a68d2f89bea 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -4550,7 +4550,8 @@ sub extract_warning_lines ($$) { qr/InnoDB: See also */, qr/InnoDB: Cannot open .*ib_buffer_pool.* for reading: No such file or directory*/, qr/InnoDB: Table .*mysql.*innodb_table_stats.* not found./, - qr/InnoDB: User stopword table .* does not exist./ + qr/InnoDB: User stopword table .* does not exist./, + qr/Dump thread [0-9]+ last sent to server [0-9]+ binlog file:pos .+/ ); diff --git a/mysql-test/suite/rpl/include/rpl_shutdown_wait_slaves.inc b/mysql-test/suite/rpl/include/rpl_shutdown_wait_slaves.inc index 5d71fab246a..476b41033e8 100644 --- a/mysql-test/suite/rpl/include/rpl_shutdown_wait_slaves.inc +++ b/mysql-test/suite/rpl/include/rpl_shutdown_wait_slaves.inc @@ -1,6 +1,5 @@ --connection server_1 -call mtr.add_suppression("Dump thread [0-9]+ last sent to server [0-9]+ binlog file:pos .+"); CREATE TABLE t1 (a INT) ENGINE=innodb; --save_master_pos diff --git a/mysql-test/suite/rpl/r/rpl_shutdown_wait_semisync_slaves.result b/mysql-test/suite/rpl/r/rpl_shutdown_wait_semisync_slaves.result index 3c8b35009ff..e310ba3326d 100644 --- a/mysql-test/suite/rpl/r/rpl_shutdown_wait_semisync_slaves.result +++ b/mysql-test/suite/rpl/r/rpl_shutdown_wait_semisync_slaves.result @@ -13,7 +13,6 @@ include/stop_slave.inc include/start_slave.inc set global rpl_semi_sync_slave_enabled = 1; connection server_1; -call mtr.add_suppression("Dump thread [0-9]+ last sent to server [0-9]+ binlog file:pos .+"); CREATE TABLE t1 (a INT) ENGINE=innodb; connection server_2; connection server_3; diff --git a/mysql-test/suite/rpl/r/rpl_shutdown_wait_slaves.result b/mysql-test/suite/rpl/r/rpl_shutdown_wait_slaves.result index b65c09e3ca3..0fcff8fa349 100644 --- a/mysql-test/suite/rpl/r/rpl_shutdown_wait_slaves.result +++ b/mysql-test/suite/rpl/r/rpl_shutdown_wait_slaves.result @@ -1,6 +1,5 @@ include/rpl_init.inc [topology=1->2, 1->3, 1->4] connection server_1; -call mtr.add_suppression("Dump thread [0-9]+ last sent to server [0-9]+ binlog file:pos .+"); CREATE TABLE t1 (a INT) ENGINE=innodb; connection server_2; connection server_3; diff --git a/mysql-test/suite/rpl/t/rpl_shutdown_wait_semisync_slaves.cnf b/mysql-test/suite/rpl/t/rpl_shutdown_wait_semisync_slaves.cnf index 9ee166f7b92..8ff9df0384d 100644 --- a/mysql-test/suite/rpl/t/rpl_shutdown_wait_semisync_slaves.cnf +++ b/mysql-test/suite/rpl/t/rpl_shutdown_wait_semisync_slaves.cnf @@ -1,7 +1,6 @@ !include ../my.cnf [mysqld.1] -debug_dbug="+d,mysql_admin_shutdown_wait_for_slaves" log_warnings=3 [mysqld.2] diff --git a/mysql-test/suite/rpl/t/rpl_shutdown_wait_slaves.cnf b/mysql-test/suite/rpl/t/rpl_shutdown_wait_slaves.cnf index 9ee166f7b92..8ff9df0384d 100644 --- a/mysql-test/suite/rpl/t/rpl_shutdown_wait_slaves.cnf +++ b/mysql-test/suite/rpl/t/rpl_shutdown_wait_slaves.cnf @@ -1,7 +1,6 @@ !include ../my.cnf [mysqld.1] -debug_dbug="+d,mysql_admin_shutdown_wait_for_slaves" log_warnings=3 [mysqld.2] diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b73c813e63e..26f94518d1b 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1521,7 +1521,7 @@ static void end_ssl(); ****************************************************************************/ /* common callee of two shutdown phases */ -static my_bool kill_thread(THD *thd) +static void kill_thread(THD *thd) { if (WSREP(thd)) mysql_mutex_lock(&thd->LOCK_thd_data); mysql_mutex_lock(&thd->LOCK_thd_kill); @@ -1548,7 +1548,6 @@ static my_bool kill_thread(THD *thd) } mysql_mutex_unlock(&thd->LOCK_thd_kill); if (WSREP(thd)) mysql_mutex_unlock(&thd->LOCK_thd_data); - return 0; } @@ -1567,7 +1566,8 @@ static my_bool kill_thread_phase_1(THD *thd, void *) thd->set_killed(KILL_SERVER_HARD); MYSQL_CALLBACK(thread_scheduler, post_kill_notification, (thd)); - return kill_thread(thd); + kill_thread(thd); + return 0; } @@ -1585,30 +1585,28 @@ static my_bool kill_thread_phase_2(THD *thd, void *) thd->set_killed(KILL_SERVER_HARD); MYSQL_CALLBACK(thread_scheduler, post_kill_notification, (thd)); } - return kill_thread(thd); -} - - -static my_bool warn_threads_still_active(THD *thd, void *) -{ - sql_print_warning("%s: Thread %llu (user : '%s') did not exit\n", my_progname, - (ulonglong) thd->thread_id, - (thd->main_security_ctx.user ? - thd->main_security_ctx.user : "")); + kill_thread(thd); return 0; } + /* associated with the kill thread phase 1 */ static my_bool warn_threads_active_after_phase_1(THD *thd, void *) { - return !thd->is_binlog_dump_thread() ? warn_threads_still_active(thd, 0) : 0; + if (!thd->is_binlog_dump_thread()) + sql_print_warning("%s: Thread %llu (user : '%s') did not exit\n", my_progname, + (ulonglong) thd->thread_id, + (thd->main_security_ctx.user ? + thd->main_security_ctx.user : "")); + return 0; } -static my_bool warn_dump_thread_is_active(THD *thd) +/* associated with the kill thread phase 2 */ +static my_bool warn_threads_active_after_phase_2(THD *thd, void *) { mysql_mutex_lock(&thd->LOCK_thd_data); - // dump thread may not have yet current_linfo set + // dump thread may not have yet (or already) current_linfo set sql_print_warning("Dump thread %llu last sent to server %lu " "binlog file:pos %s:%llu", thd->thread_id, thd->variables.server_id, @@ -1621,13 +1619,6 @@ static my_bool warn_dump_thread_is_active(THD *thd) } -/* associated with the kill thread phase 2 */ -static my_bool warn_threads_active_after_phase_2(THD *thd, void *) -{ - return thd->is_binlog_dump_thread() ? warn_dump_thread_is_active(thd) : 0; -} - - /** Kills main thread. @@ -1725,6 +1716,7 @@ void kill_mysql(THD *thd) break_connect_loop(); } + static void close_connections(void) { DBUG_ENTER("close_connections"); |