Skip to content

Commit

Permalink
PS-6789 (Merge MySQL 8.0.20): Fixed main.percona_signal_handling / ma…
Browse files Browse the repository at this point in the history
…in.percona_signal_handling_threadpool MTR test cases

https://jira.percona.com/browse/PS-6789

Fixed and re-recorded 'main.percona_signal_handling' and
'main.percona_signal_handling_threadpool' MTR test in response to the changes
in the Bug #30578923
"SENDING SIGHUP CAUSES A LOT OF GARBAGE TO BE PRINTED"
(commit mysql/mysql-server@b90a1b3).
Removed "Status information:" log section is now simulated via
'DBUG_EXECUTE_IF()'. MTR test cases made debug-only.
  • Loading branch information
percona-ysorokin committed Jun 5, 2020
1 parent ed7abdb commit 3708733
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion mysql-test/include/percona_signal_handling.inc
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
--source include/have_debug.inc

#
# Test the effect of various signals on the server
#
--let $test_error_log= $MYSQLTEST_VARDIR/tmp/test_threadpool_sig_handler.err
--let $restart_parameters=restart:--log-error=$test_error_log
--let $restart_parameters=restart:--log-error=$test_error_log --debug=d,simulate_sighup_print_status
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--source include/restart_mysqld.inc

Expand Down
2 changes: 1 addition & 1 deletion mysql-test/r/percona_signal_handling.result
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Test server signal handling with one-thread-per-connection handler
#
# restart:--log-error=MYSQLTEST_VARDIR/tmp/test_threadpool_sig_handler.err
# restart:--log-error=MYSQLTEST_VARDIR/tmp/test_threadpool_sig_handler.err --debug=d,simulate_sighup_print_status
SELECT @@GLOBAL.thread_handling;
@@GLOBAL.thread_handling
one-thread-per-connection
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/r/percona_signal_handling_threadpool.result
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Test server signal handling with threadpool
#
# restart:--log-error=MYSQLTEST_VARDIR/tmp/test_threadpool_sig_handler.err
# restart:--log-error=MYSQLTEST_VARDIR/tmp/test_threadpool_sig_handler.err --debug=d,simulate_sighup_print_status
SELECT @@GLOBAL.thread_handling;
@@GLOBAL.thread_handling
pool-of-threads
Expand Down
4 changes: 4 additions & 0 deletions sql/mysqld.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3586,6 +3586,10 @@ extern "C" void *signal_hand(void *arg MY_ATTRIBUTE((unused))) {
case SIGHUP:
if (!connection_events_loop_aborted()) {
int not_used;
DBUG_EXECUTE_IF("simulate_sighup_print_status", {
printf("\nStatus information:\n\n");
fflush(stdout);
});
handle_reload_request(
nullptr,
(REFRESH_LOG | REFRESH_TABLES | REFRESH_FAST | REFRESH_GRANT |
Expand Down

0 comments on commit 3708733

Please sign in to comment.