86 lines
2.8 KiB
Plaintext
86 lines
2.8 KiB
Plaintext
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 master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
|
|
[connection server1]
|
|
|
|
####
|
|
# 0) The test requires three servers.
|
|
####
|
|
|
|
SET sql_log_bin = 0;
|
|
call mtr.add_suppression("Member was expelled from the group due to network failures, changing member status to ERROR.");
|
|
call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
|
|
call mtr.add_suppression("Started auto-rejoin procedure attempt*");
|
|
call mtr.add_suppression("Auto-rejoin procedure attempt*");
|
|
SET sql_log_bin = 1;
|
|
include/gr_autorejoin_monitoring.inc
|
|
SET @debug_saved = @@GLOBAL.DEBUG;
|
|
SET @@GLOBAL.DEBUG='+d,group_replication_rejoin_short_retry';
|
|
SET @@GLOBAL.DEBUG='+d,group_replication_stop_before_rejoin';
|
|
include/start_and_bootstrap_group_replication.inc
|
|
[connection server2]
|
|
include/start_group_replication.inc
|
|
[connection server3]
|
|
include/start_group_replication.inc
|
|
|
|
####
|
|
# 1) Expel one of the members.
|
|
####
|
|
|
|
[connection server1]
|
|
SET GLOBAL group_replication_autorejoin_tries = 1;
|
|
include/gr_expel_member_from_group.inc
|
|
SET SESSION sql_log_bin = 0;
|
|
CREATE TABLE pid_table(pid_no INT PRIMARY KEY);
|
|
LOAD DATA LOCAL INFILE 'pid_file' INTO TABLE pid_table;
|
|
DROP TABLE pid_table;
|
|
SET SESSION sql_log_bin = 1;
|
|
|
|
####
|
|
# 2) Verify that the expelled member will try to rejoin the group the
|
|
# number of it is configured in group_replication_autorejoin_tries
|
|
# sysvar.
|
|
####
|
|
|
|
[connection server1]
|
|
SET DEBUG_SYNC = "now WAIT_FOR signal.autorejoin_waiting";
|
|
[connection server2]
|
|
include/rpl_gr_wait_for_number_of_members.inc
|
|
[connection server3]
|
|
include/rpl_gr_wait_for_number_of_members.inc
|
|
include/gr_find_a_primary.inc
|
|
[connection server1]
|
|
include/assert.inc [Auto-rejoin should be running]
|
|
include/assert.inc [super_read_only should be enabled]
|
|
include/assert.inc [We should have attempted 1 rejoin]
|
|
SET DEBUG_SYNC = "now SIGNAL signal.autorejoin_continue";
|
|
|
|
####
|
|
# 3) Verify that it manages to rejoin the group.
|
|
####
|
|
|
|
include/gr_wait_for_member_state.inc
|
|
include/rpl_gr_wait_for_number_of_members.inc
|
|
[connection server2]
|
|
include/rpl_gr_wait_for_number_of_members.inc
|
|
[connection server3]
|
|
include/rpl_gr_wait_for_number_of_members.inc
|
|
|
|
####
|
|
# 4) Verify that the newly rejoined member is no longer the primary.
|
|
####
|
|
|
|
[connection server1]
|
|
include/gr_assert_secondary_member.inc
|
|
|
|
####
|
|
# 5) Cleanup.
|
|
####
|
|
|
|
include/stop_group_replication.inc
|
|
SET @@GLOBAL.DEBUG = @debug_saved;
|
|
SET @@GLOBAL.group_replication_autorejoin_tries = default;
|
|
include/gr_end_autorejoin_monitoring.inc
|
|
include/group_replication_end.inc
|