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 49 50 51 52 53
|
include/group_replication.inc [rpl_server_count=3]
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. Server1 start and bootstrap the group
include/start_and_bootstrap_group_replication.inc
# 2. Start server2
[connection server2]
include/start_group_replication.inc
# 3. Start server3 and fake a stopped applier
[connection server3]
set session sql_log_bin=0;
call mtr.add_suppression("A configuration change was killed in this member. The member will now leave the group as its configuration may have diverged.");
call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
call mtr.add_suppression("Error while executing a group configuration operation: This operation ended in error as it was not possible to wait for the execution of the plugin queued transactions. The member will now leave the group.");
call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
set session sql_log_bin=1;
include/start_group_replication.inc
SET @@GLOBAL.DEBUG= '+d,group_replication_wait_for_gtid_execution_force_error';
# 4. Execute action to switch to multi primary
[connection server1]
SELECT group_replication_switch_to_multi_primary_mode();
# 5. Server3 will leave group
[connection server2]
include/rpl_gr_wait_for_number_of_members.inc
# 6. Server3 changed to ERROR state
[connection server3]
include/gr_wait_for_member_state.inc
SET @@GLOBAL.DEBUG= '-d,group_replication_wait_for_gtid_execution_force_error';
# 7. Check that Single primary mode is false on the stuck member and the
# update everywhere checks are true
include/assert.inc [group_replication_enforce_update_everywhere_checks is ON]
include/assert.inc [The single primary mode should be 0 here.]
# 8. Reap action executed
[connection server1]
group_replication_switch_to_multi_primary_mode()
Mode switched to multi-primary successfully.
# 9. Cleanup
[connection server3]
include/stop_group_replication.inc
include/gr_wait_for_member_state.inc
include/start_group_replication.inc
include/group_replication_end.inc
|