| 1 |
include/master-slave.inc |
| 2 |
[connection master] |
| 3 |
connection slave; |
| 4 |
set statement sql_log_bin=0 for call mtr.add_suppression("Signal handler thread did not exit in a timely manner"); |
| 5 |
# |
| 6 |
# Main test |
| 7 |
connection master; |
| 8 |
create table t1 (a int); |
| 9 |
insert into t1 values (1); |
| 10 |
include/save_master_gtid.inc |
| 11 |
connection slave; |
| 12 |
include/sync_with_master_gtid.inc |
| 13 |
set @@global.debug_dbug= "+d,hold_sighup_log_refresh"; |
| 14 |
# Waiting for sighup to reach reload_acl_and_cache.. |
| 15 |
set debug_sync="now wait_for in_reload_acl_and_cache"; |
| 16 |
# Signalling signal handler to proceed to sleep before REFRESH_HOSTS |
| 17 |
set debug_sync="now signal refresh_logs"; |
| 18 |
# Starting shutdown (note this will take 3+ seconds due to DBUG my_sleep in reload_acl_and_cache) |
| 19 |
shutdown; |
| 20 |
connection server_2; |
| 21 |
connection slave; |
| 22 |
include/assert_grep.inc [Ensure Mariadbd did not segfault when shutting down] |
| 23 |
connection master; |
| 24 |
connection slave; |
| 25 |
# |
| 26 |
# Error testcase to ensure an error message is shown if the signal |
| 27 |
# takes longer than the timeout while processing the SIGHUP |
| 28 |
connection slave; |
| 29 |
set @@global.debug_dbug= "+d,force_sighup_processing_timeout"; |
| 30 |
set @@global.debug_dbug= "+d,hold_sighup_log_refresh"; |
| 31 |
connection master; |
| 32 |
insert into t1 values (1); |
| 33 |
include/save_master_gtid.inc |
| 34 |
connection slave; |
| 35 |
include/sync_with_master_gtid.inc |
| 36 |
# Waiting for sighup to reach reload_acl_and_cache.. |
| 37 |
set debug_sync="now wait_for in_reload_acl_and_cache"; |
| 38 |
# Signalling signal handler to proceed to sleep before REFRESH_HOSTS |
| 39 |
set debug_sync="now signal refresh_logs"; |
| 40 |
# Starting shutdown (note this will take 3+ seconds due to DBUG my_sleep in reload_acl_and_cache) |
| 41 |
shutdown; |
| 42 |
connection server_2; |
| 43 |
connection slave; |
| 44 |
include/assert_grep.inc [Ensure warning is issued that signal handler thread is still processing] |
| 45 |
# |
| 46 |
# Cleanup |
| 47 |
connection master; |
| 48 |
drop table t1; |
| 49 |
include/rpl_end.inc |
| 50 |
# End of rpl_shutdown_sighup.test |