File: gr_stop_gr_kills_binlog_dump.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (148 lines) | stat: -rw-r--r-- 6,630 bytes parent folder | download
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
include/group_replication.inc [rpl_server_count=4]
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. Start GR on M1(primary) and create table t1.
[connection server1]
set session sql_log_bin=0;
call mtr.add_suppression("Replica SQL for channel 'group_replication_applier': Could not execute Write_rows event on table .*");
call mtr.add_suppression("Replica SQL for channel 'group_replication_applier': Worker . failed executing transaction .*");
call mtr.add_suppression("Replica SQL for channel 'group_replication_applier': ... The replica coordinator and worker threads are stopped, .*");
call mtr.add_suppression("Replica: Duplicate entry '.' for key 't1.PRIMARY' Error_code: MY-001062");
call mtr.add_suppression("The applier thread execution was aborted. .*");
call mtr.add_suppression("Error running query, replica SQL thread aborted. .*");
call mtr.add_suppression("Fatal error during execution on the Applier process of Group Replication. The server will now leave the group.");
call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
set session sql_log_bin=1;
include/start_and_bootstrap_group_replication.inc
CREATE TABLE test.t1 (a INT PRIMARY KEY NOT NULL);
INSERT INTO test.t1 values (1);

# 2. Start M2.
[connection server2]
include/start_group_replication.inc

# 3. Create and start new channel ch3_1: M1(master), M3(slave)
#    and ch4_1: M1(master), M4(slave).
[connection server3]
set session sql_log_bin=0;
call mtr.add_suppression("Error reading packet from server for channel 'ch3_1': .*");
set session sql_log_bin=1;
CHANGE REPLICATION SOURCE TO SOURCE_HOST='localhost', SOURCE_USER='root', SOURCE_PORT=SERVER_1_PORT for channel 'ch3_1';
Warnings:
Note	1759	Sending passwords in plain text without SSL/TLS is extremely insecure.
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.
include/start_slave.inc [FOR CHANNEL 'ch3_1']
[connection server4]
set session sql_log_bin=0;
call mtr.add_suppression("Error reading packet from server for channel 'ch4_1': .*");
set session sql_log_bin=1;
CHANGE REPLICATION SOURCE TO SOURCE_HOST='localhost', SOURCE_USER='root', SOURCE_PORT=SERVER_1_PORT for channel 'ch4_1';
Warnings:
Note	1759	Sending passwords in plain text without SSL/TLS is extremely insecure.
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.
include/start_slave.inc [FOR CHANNEL 'ch4_1']

# 4. Insert row on M1 and table t1 with binlog off.
[connection server1]
SET sql_log_bin=0;
INSERT INTO test.t1 values (2);
SET sql_log_bin=1;

# 5. Insert same row in M2 so that M1 stops due to primary key coflict.
[connection server2]
SET GLOBAL super_read_only= 0;
INSERT INTO test.t1 values (2);

# 6. Wait for GR to ERROR out on M1.
[connection server1]
include/gr_wait_for_member_state.inc
SET GLOBAL super_read_only= FALSE;
SET sql_log_bin=0;
INSERT INTO test.t1 values (3);
SET sql_log_bin=1;
SET GLOBAL super_read_only= TRUE;

# 7. Assert channels ch3_1 and ch4_1 have errored out.
#    Assert binlog dump thread is not present in threads table.
include/assert.inc [Thread Binlog Dump GTID is killed.]
[connection server3]
include/assert_grep.inc [Master connection is lost.]
include/assert.inc [Slave connection is stopped.]
[connection server4]
include/assert_grep.inc [Master connection is lost.]
include/assert.inc [Slave connection is stopped.]

# 8. Restore M3 channel.
[connection server3]
include/stop_slave.inc [FOR CHANNEL 'ch3_1']
[connection server4]
include/stop_slave.inc [FOR CHANNEL 'ch4_1']
[connection server1]
SET GLOBAL super_read_only= FALSE;
SET sql_log_bin=0;
DELETE FROM test.t1 WHERE a=3;
SET sql_log_bin=1;
SET GLOBAL super_read_only= TRUE;

# 9. Start GR on M1 and channel ch3_1: M1(master), M3(slave)
#    and ch4_1: M1(master), M4(slave).
include/stop_group_replication.inc
SET sql_log_bin=0;
DELETE FROM test.t1 WHERE a=2;
SET sql_log_bin=1;
include/start_group_replication.inc
SELECT group_replication_set_as_primary("SERVER1_UUID");
group_replication_set_as_primary("SERVER1_UUID")
Primary server switched to: SERVER1_UUID
INSERT INTO test.t1 values (3);
[connection server3]
include/start_slave.inc [FOR CHANNEL 'ch3_1']
[connection server4]
include/start_slave.inc [FOR CHANNEL 'ch4_1']

# 10. Stop GR on M1.
[connection server1]
include/stop_group_replication.inc
SET GLOBAL super_read_only= FALSE;
SET sql_log_bin=0;
INSERT INTO test.t1 values (4);
SET sql_log_bin=1;
SET GLOBAL super_read_only= TRUE;

# 11. Assert channels ch3_1 and ch4_1 have errored out.
#     Assert binlog dump thread is not present in threads table.
include/assert.inc [Thread Binlog Dump GTID is killed.]
[connection server3]
include/assert_grep.inc [Master connection is lost.]
include/assert.inc [Slave connection is stopped.]
[connection server4]
include/assert_grep.inc [Master connection is lost.]
include/assert.inc [Slave connection is stopped.]

# 12. Cleanup
[connection server1]
SET GLOBAL super_read_only= FALSE;
SET sql_log_bin=0;
DELETE FROM test.t1 WHERE a=4;
SET sql_log_bin=1;
SET GLOBAL super_read_only= TRUE;
include/start_group_replication.inc
[connection server2]
DROP TABLE test.t1;
[connection server3]
include/stop_slave.inc [FOR CHANNEL 'ch3_1']
RESET SLAVE ALL FOR CHANNEL 'ch3_1';
Warnings:
Warning	1287	'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
include/start_group_replication.inc
[connection server4]
include/stop_slave.inc [FOR CHANNEL 'ch4_1']
RESET SLAVE ALL FOR CHANNEL 'ch4_1';
Warnings:
Warning	1287	'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
include/start_group_replication.inc
include/group_replication_end.inc