Debian Codegraph @

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

raw
1 include/group_replication.inc [rpl_server_count=4]
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 # 1. Start GR on M1(primary) and create table t1.
8 [connection server1]
9 set session sql_log_bin=0;
10 call mtr.add_suppression("Replica SQL for channel 'group_replication_applier': Could not execute Write_rows event on table .*");
11 call mtr.add_suppression("Replica SQL for channel 'group_replication_applier': Worker . failed executing transaction .*");
12 call mtr.add_suppression("Replica SQL for channel 'group_replication_applier': ... The replica coordinator and worker threads are stopped, .*");
13 call mtr.add_suppression("Replica: Duplicate entry '.' for key 't1.PRIMARY' Error_code: MY-001062");
14 call mtr.add_suppression("The applier thread execution was aborted. .*");
15 call mtr.add_suppression("Error running query, replica SQL thread aborted. .*");
16 call mtr.add_suppression("Fatal error during execution on the Applier process of Group Replication. The server will now leave the group.");
17 call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
18 call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
19 set session sql_log_bin=1;
20 include/start_and_bootstrap_group_replication.inc
21 CREATE TABLE test.t1 (a INT PRIMARY KEY NOT NULL);
22 INSERT INTO test.t1 values (1);
23
24 # 2. Start M2.
25 [connection server2]
26 include/start_group_replication.inc
27
28 # 3. Create and start new channel ch3_1: M1(master), M3(slave)
29 # and ch4_1: M1(master), M4(slave).
30 [connection server3]
31 set session sql_log_bin=0;
32 call mtr.add_suppression("Error reading packet from server for channel 'ch3_1': .*");
33 set session sql_log_bin=1;
34 CHANGE REPLICATION SOURCE TO SOURCE_HOST='localhost', SOURCE_USER='root', SOURCE_PORT=SERVER_1_PORT for channel 'ch3_1';
35 Warnings:
36 Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
37 Note 1760 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.
38 include/start_slave.inc [FOR CHANNEL 'ch3_1']
39 [connection server4]
40 set session sql_log_bin=0;
41 call mtr.add_suppression("Error reading packet from server for channel 'ch4_1': .*");
42 set session sql_log_bin=1;
43 CHANGE REPLICATION SOURCE TO SOURCE_HOST='localhost', SOURCE_USER='root', SOURCE_PORT=SERVER_1_PORT for channel 'ch4_1';
44 Warnings:
45 Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
46 Note 1760 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.
47 include/start_slave.inc [FOR CHANNEL 'ch4_1']
48
49 # 4. Insert row on M1 and table t1 with binlog off.
50 [connection server1]
51 SET sql_log_bin=0;
52 INSERT INTO test.t1 values (2);
53 SET sql_log_bin=1;
54
55 # 5. Insert same row in M2 so that M1 stops due to primary key coflict.
56 [connection server2]
57 SET GLOBAL super_read_only= 0;
58 INSERT INTO test.t1 values (2);
59
60 # 6. Wait for GR to ERROR out on M1.
61 [connection server1]
62 include/gr_wait_for_member_state.inc
63 SET GLOBAL super_read_only= FALSE;
64 SET sql_log_bin=0;
65 INSERT INTO test.t1 values (3);
66 SET sql_log_bin=1;
67 SET GLOBAL super_read_only= TRUE;
68
69 # 7. Assert channels ch3_1 and ch4_1 have errored out.
70 # Assert binlog dump thread is not present in threads table.
71 include/assert.inc [Thread Binlog Dump GTID is killed.]
72 [connection server3]
73 include/assert_grep.inc [Master connection is lost.]
74 include/assert.inc [Slave connection is stopped.]
75 [connection server4]
76 include/assert_grep.inc [Master connection is lost.]
77 include/assert.inc [Slave connection is stopped.]
78
79 # 8. Restore M3 channel.
80 [connection server3]
81 include/stop_slave.inc [FOR CHANNEL 'ch3_1']
82 [connection server4]
83 include/stop_slave.inc [FOR CHANNEL 'ch4_1']
84 [connection server1]
85 SET GLOBAL super_read_only= FALSE;
86 SET sql_log_bin=0;
87 DELETE FROM test.t1 WHERE a=3;
88 SET sql_log_bin=1;
89 SET GLOBAL super_read_only= TRUE;
90
91 # 9. Start GR on M1 and channel ch3_1: M1(master), M3(slave)
92 # and ch4_1: M1(master), M4(slave).
93 include/stop_group_replication.inc
94 SET sql_log_bin=0;
95 DELETE FROM test.t1 WHERE a=2;
96 SET sql_log_bin=1;
97 include/start_group_replication.inc
98 SELECT group_replication_set_as_primary("SERVER1_UUID");
99 group_replication_set_as_primary("SERVER1_UUID")
100 Primary server switched to: SERVER1_UUID
101 INSERT INTO test.t1 values (3);
102 [connection server3]
103 include/start_slave.inc [FOR CHANNEL 'ch3_1']
104 [connection server4]
105 include/start_slave.inc [FOR CHANNEL 'ch4_1']
106
107 # 10. Stop GR on M1.
108 [connection server1]
109 include/stop_group_replication.inc
110 SET GLOBAL super_read_only= FALSE;
111 SET sql_log_bin=0;
112 INSERT INTO test.t1 values (4);
113 SET sql_log_bin=1;
114 SET GLOBAL super_read_only= TRUE;
115
116 # 11. Assert channels ch3_1 and ch4_1 have errored out.
117 # Assert binlog dump thread is not present in threads table.
118 include/assert.inc [Thread Binlog Dump GTID is killed.]
119 [connection server3]
120 include/assert_grep.inc [Master connection is lost.]
121 include/assert.inc [Slave connection is stopped.]
122 [connection server4]
123 include/assert_grep.inc [Master connection is lost.]
124 include/assert.inc [Slave connection is stopped.]
125
126 # 12. Cleanup
127 [connection server1]
128 SET GLOBAL super_read_only= FALSE;
129 SET sql_log_bin=0;
130 DELETE FROM test.t1 WHERE a=4;
131 SET sql_log_bin=1;
132 SET GLOBAL super_read_only= TRUE;
133 include/start_group_replication.inc
134 [connection server2]
135 DROP TABLE test.t1;
136 [connection server3]
137 include/stop_slave.inc [FOR CHANNEL 'ch3_1']
138 RESET SLAVE ALL FOR CHANNEL 'ch3_1';
139 Warnings:
140 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
141 include/start_group_replication.inc
142 [connection server4]
143 include/stop_slave.inc [FOR CHANNEL 'ch4_1']
144 RESET SLAVE ALL FOR CHANNEL 'ch4_1';
145 Warnings:
146 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
147 include/start_group_replication.inc
148 include/group_replication_end.inc