Debian Codegraph @

mysql-test/suite/group_replication/r/gr_autorejoin_member_expel_rejoin_successful.result

raw
1 include/group_replication.inc [rpl_server_count=3]
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 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.
5 [connection server1]
6
7 ####
8 # 0) The test requires three servers.
9 ####
10
11 SET sql_log_bin = 0;
12 call mtr.add_suppression("Member was expelled from the group due to network failures, changing member status to ERROR.");
13 call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
14 call mtr.add_suppression("Started auto-rejoin procedure attempt*");
15 call mtr.add_suppression("Auto-rejoin procedure attempt*");
16 SET sql_log_bin = 1;
17 include/gr_autorejoin_monitoring.inc
18 SET @debug_saved = @@GLOBAL.DEBUG;
19 SET @@GLOBAL.DEBUG='+d,group_replication_rejoin_short_retry';
20 SET @@GLOBAL.DEBUG='+d,group_replication_stop_before_rejoin';
21 include/start_and_bootstrap_group_replication.inc
22 [connection server2]
23 include/start_group_replication.inc
24 [connection server3]
25 include/start_group_replication.inc
26 CREATE TABLE t1(a INT PRIMARY KEY);
27 INSERT INTO t1 VALUES(1);
28 INSERT INTO t1 VALUES(2);
29 INSERT INTO t1 VALUES(3);
30 INSERT INTO t1 VALUES(4);
31 include/rpl_sync.inc
32
33 ####
34 # 1) Expel one of the members.
35 ####
36
37 [connection server1]
38 SET GLOBAL group_replication_autorejoin_tries = 1;
39 include/gr_expel_member_from_group.inc
40 SET SESSION sql_log_bin = 0;
41 CREATE TABLE pid_table(pid_no INT PRIMARY KEY);
42 LOAD DATA LOCAL INFILE 'pid_file' INTO TABLE pid_table;
43 DROP TABLE pid_table;
44 SET SESSION sql_log_bin = 1;
45 [connection server2]
46 INSERT INTO t1 VALUES(5);
47 include/rpl_sync.inc
48
49 ####
50 # 2) Verify that the expelled member will try to rejoin the group the
51 # number of it is configured in group_replication_autorejoin_tries
52 # sysvar.
53 ####
54
55 [connection server1]
56 SET DEBUG_SYNC = "now WAIT_FOR signal.autorejoin_waiting";
57 include/assert.inc [Auto-rejoin should be running]
58 include/assert.inc [super_read_only should be enabled]
59 include/assert.inc [We should have attempted 1 rejoin]
60 SET DEBUG_SYNC = "now SIGNAL signal.autorejoin_continue";
61
62 ####
63 # 3) Verify that it manages to rejoin the group.
64 ####
65
66 include/gr_wait_for_member_state.inc
67 include/rpl_gr_wait_for_number_of_members.inc
68 [connection server2]
69 include/rpl_gr_wait_for_number_of_members.inc
70 [connection server3]
71 include/rpl_gr_wait_for_number_of_members.inc
72 include/diff_tables.inc [server1:t1, server2:t1, server3:t1]
73
74 ####
75 # 4) Cleanup.
76 ####
77
78 [connection server1]
79 DROP TABLE t1;
80 SET @@GLOBAL.DEBUG = @debug_saved;
81 SET @@GLOBAL.group_replication_autorejoin_tries = default;
82 include/gr_end_autorejoin_monitoring.inc
83 include/group_replication_end.inc