Debian Codegraph @

mysql-test/suite/group_replication/r/gr_autorejoin_option.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 [connection server2]
12 SET sql_log_bin = 0;
13 call mtr.add_suppression("Member was expelled from the group due to network failures, changing member status to ERROR.");
14 call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
15 call mtr.add_suppression("\\[GCS\\] The member has left the group but the new view will not be installed*");
16 call mtr.add_suppression("Started auto-rejoin procedure attempt*");
17 call mtr.add_suppression("Auto-rejoin procedure attempt*");
18 call mtr.add_suppression("Unable to confirm whether the server has left the group or not. Check performance_schema.replication_group_members to check group membership information.");
19 SET sql_log_bin = 1;
20 include/gr_autorejoin_monitoring.inc
21
22 ####
23 # 1) Verify that the default is 3.
24 ####
25
26 SET @@GLOBAL.group_replication_autorejoin_tries = default;
27 include/assert.inc [The default of group_replication_autorejoin_tries should be 3]
28
29 ####
30 # 2) Verify that only positive values are accepted.
31 ####
32
33 SET GLOBAL group_replication_autorejoin_tries = 0.5;
34 ERROR 42000: Incorrect argument type to variable 'group_replication_autorejoin_tries'
35 SET GLOBAL group_replication_autorejoin_tries = "string";
36 ERROR 42000: Incorrect argument type to variable 'group_replication_autorejoin_tries'
37 SET GLOBAL group_replication_autorejoin_tries = on;
38 ERROR 42000: Incorrect argument type to variable 'group_replication_autorejoin_tries'
39 SET GLOBAL group_replication_autorejoin_tries = -1;
40 ERROR 42000: Variable 'group_replication_autorejoin_tries' can't be set to the value of '-1'
41 SET GLOBAL group_replication_autorejoin_tries = 2016;
42 SET GLOBAL group_replication_autorejoin_tries = 2017;
43 ERROR 42000: Variable 'group_replication_autorejoin_tries' can't be set to the value of '2017'
44
45 ####
46 # 3) Verify that when it is 0, the auto-rejoin process isn't run.
47 ####
48
49 SET GLOBAL group_replication_autorejoin_tries = 0;
50 include/gr_expel_member_from_group.inc
51 SET SESSION sql_log_bin = 0;
52 CREATE TABLE pid_table(pid_no INT PRIMARY KEY);
53 LOAD DATA LOCAL INFILE 'pid_file' INTO TABLE pid_table;
54 DROP TABLE pid_table;
55 SET SESSION sql_log_bin = 1;
56 include/assert.inc [Auto-rejoin should not have been executed]
57
58 ####
59 # 4) Verify that when it is greater than 0, the auto-rejoin process is
60 # run.
61 ####
62
63 include/stop_group_replication.inc
64 SET @debug_saved = @@GLOBAL.DEBUG;
65 SET @@GLOBAL.DEBUG='+d,group_replication_stop_before_rejoin_loop';
66 include/start_group_replication.inc
67 SET GLOBAL group_replication_autorejoin_tries = 3;
68 include/gr_expel_member_from_group.inc
69 SET SESSION sql_log_bin = 0;
70 CREATE TABLE pid_table(pid_no INT PRIMARY KEY);
71 LOAD DATA LOCAL INFILE 'pid_file' INTO TABLE pid_table;
72 DROP TABLE pid_table;
73 SET SESSION sql_log_bin = 1;
74 SET DEBUG_SYNC = "now WAIT_FOR signal.autorejoin_entering_loop";
75 include/assert.inc [Auto-rejoin should be running]
76
77 ####
78 # 5) Verify that you can't update the group_replication_autorejoin_tries
79 # sysvar when an auto-rejoin is ongoing.
80 ####
81
82 SET GLOBAL group_replication_autorejoin_tries = 1;
83 ERROR HY000: Cannot update the number of auto-rejoin retry attempts when an auto-rejoin process is already running.
84 SET DEBUG_SYNC = "now SIGNAL signal.autorejoin_enter_loop";
85 include/stop_group_replication.inc
86 SET @@GLOBAL.DEBUG='+d,group_replication_rejoin_short_retry';
87 include/start_group_replication.inc
88 SET @@GLOBAL.DEBUG='+d,group_replication_fail_rejoin';
89 SET @@GLOBAL.DEBUG='-d,group_replication_stop_before_rejoin_loop';
90 SET @@GLOBAL.DEBUG='+d,group_replication_stop_before_rejoin';
91 SET GLOBAL group_replication_autorejoin_tries = 2;
92 include/gr_expel_member_from_group.inc
93 SET SESSION sql_log_bin = 0;
94 CREATE TABLE pid_table(pid_no INT PRIMARY KEY);
95 LOAD DATA LOCAL INFILE 'pid_file' INTO TABLE pid_table;
96 DROP TABLE pid_table;
97 SET SESSION sql_log_bin = 1;
98 SET DEBUG_SYNC = "now WAIT_FOR signal.autorejoin_waiting";
99 include/assert.inc [Auto-rejoin should be running]
100 include/assert.inc [super_read_only should be enabled]
101 include/assert.inc [We should have attempted 1 rejoin]
102 SET DEBUG_SYNC = "now SIGNAL signal.autorejoin_continue";
103 SET DEBUG_SYNC = "now WAIT_FOR signal.autorejoin_waiting";
104 SET @@GLOBAL.DEBUG='-d,group_replication_fail_rejoin';
105 SET DEBUG_SYNC = "now SIGNAL signal.autorejoin_continue";
106 include/gr_wait_for_member_state.inc
107
108 ####
109 # 6) Cleanup.
110 ####
111
112 include/gr_end_autorejoin_monitoring.inc
113 SET @@GLOBAL.DEBUG = @debug_saved;
114 SET GLOBAL group_replication_autorejoin_tries = default;
115 include/group_replication_end.inc