1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
include/group_replication.inc [rpl_server_count=2]
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
[connection server1]
# 1. Activate debug point will block action after verify plugin isn't
# stopping
[connection server1]
set session sql_log_bin=0;
call mtr.add_suppression("The function 'group_replication_switch_to_single_primary_mode' failed. The group coordination process is terminating.");
set session sql_log_bin=1;
SET @debug_saved = @@GLOBAL.DEBUG;
SET @@GLOBAL.DEBUG='+d,group_replication_hold_udf_after_plugin_is_stopping';
# 2. Start action switch to single primary mode
SELECT group_replication_switch_to_single_primary_mode("MEMBER1_UUID");
# 3. Wait for action hit the debug point
[connection server_1_1]
SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_resume_udf";
# 4. STOP Group Replication on server1
STOP GROUP_REPLICATION;;
[connection server_1]
# 5. Wait for member state is OFFLINE
include/gr_wait_for_member_state.inc
# 6. To improve test but without adding more debug code, sleep to allow
# STOP Group Replication loop until UDF function finishes
# 7. Assert STOP GROUP_REPLICATION thread still runs
include/assert.inc ['There is a thread executing STOP GROUP_REPLICATION on server1']
# 8. Signal the action to continue
SET DEBUG_SYNC = "now SIGNAL signal.group_replication_resume_udf_continue";
# 9. Reap execution of action and confirm it failed
[connection server1]
ERROR HY000: Can't initialize function 'group_replication_switch_to_single_primary_mode'; Member must be ONLINE and in the majority partition.
# 10. Reap with success the execution of STOP GROUP_REPLICATION
[connection server_1_1]
# 11. Cleanup
SET @@GLOBAL.DEBUG= @debug_save;
include/group_replication_end.inc
|