################################################################################ # This test proves 2 instances of START and STOP GROUP_REPLICATION cannot be # executed in parallel. # # Test: # 0. The test requires two servers: M1 and M2. # 1. Bootstrap M1. # 2. Set parameters for server 2 for start gr. # 3. Check parallel START/STOP GR is blocked if START GR is running. # 4. Check parallel START/STOP GR is blocked if STOP GR is running. # 5. Cleanup. ################################################################################ --source include/have_debug_sync.inc --source include/have_group_replication_plugin.inc --let $rpl_skip_group_replication_start= 1 --source include/group_replication.inc --echo --echo # 1. Bootstrap M1. --let $rpl_connection_name= server1 --source include/rpl_connection.inc --source include/start_and_bootstrap_group_replication.inc --echo --echo # 2. Set parameters for server 2 for start gr. --let $rpl_connection_name= server2 --source include/rpl_connection.inc --replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME --eval SET GLOBAL group_replication_group_name= "$group_replication_group_name" SET @debug_save= @@GLOBAL.DEBUG; --echo --echo # 3. Check parallel START/STOP GR is blocked if START GR is running. SET @@GLOBAL.DEBUG='+d,group_replication_wait_on_start'; --send START GROUP_REPLICATION; --let $rpl_connection_name= server_2_1 --source include/rpl_connection.inc SET DEBUG_SYNC='now wait_for signal.start_waiting'; --error ER_GROUP_REPLICATION_COMMAND_FAILURE START GROUP_REPLICATION; --error ER_GROUP_REPLICATION_COMMAND_FAILURE STOP GROUP_REPLICATION; SET DEBUG_SYNC='now signal signal.start_continue'; --let $rpl_connection_name= server2 --source include/rpl_connection.inc --reap --let $group_replication_member_state = ONLINE --source include/gr_wait_for_member_state.inc --echo --echo # 4. Check parallel START/STOP GR is blocked if STOP GR is running. SET @@GLOBAL.DEBUG='+d,group_replication_hold_stop_before_leave_the_group'; --send STOP GROUP_REPLICATION; --let $rpl_connection_name= server_2_1 --source include/rpl_connection.inc SET DEBUG_SYNC='now wait_for signal.stopping_before_leave_the_group'; --error ER_GROUP_REPLICATION_COMMAND_FAILURE START GROUP_REPLICATION; --error ER_GROUP_REPLICATION_COMMAND_FAILURE STOP GROUP_REPLICATION; SET DEBUG_SYNC='now signal signal.resume_stop_before_leave_the_group'; --let $rpl_connection_name= server2 --source include/rpl_connection.inc --reap --let $group_replication_member_state = OFFLINE --source include/gr_wait_for_member_state.inc --echo --echo # 5. Cleanup. SET @@GLOBAL.DEBUG= @debug_save; --source include/group_replication_end.inc