Debian Codegraph @

mysql-test/suite/rpl/r/rpl_start_alter_6.result

raw
1 include/master-slave.inc
2 [connection master]
3 connection master;
4 ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
5 set global binlog_alter_two_phase = ON;
6 set binlog_alter_two_phase = ON;
7 connection slave;
8 set global gtid_strict_mode=1;
9 connection slave;
10 include/stop_slave.inc
11 SET GLOBAL slave_parallel_threads=10;
12 set global slave_parallel_mode=optimistic;
13 set global slave_domain_parallel_threads=3;
14 change master to master_use_gtid=slave_pos;
15 include/start_slave.inc
16 # Parallel Slave
17 connection master;
18 connect master_node,127.0.0.1,root,,$db_name, $M_port;
19 connect slave_node,127.0.0.1,root,,test, $S_port;
20 # myisam
21 connection master_node;
22 create table t1(a int, b int) engine=myisam;;
23 insert into t1 values(1,1);
24 insert into t1 values(2,2);
25 # Normal Alter
26 alter table t1 add column c int;
27 show create table t1;
28 Table Create Table
29 t1 CREATE TABLE `t1` (
30 `a` int(11) DEFAULT NULL,
31 `b` int(11) DEFAULT NULL,
32 `c` int(11) DEFAULT NULL
33 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
34 # Failed Alter
35 insert into t1 values(1,1, NULL);
36 alter table t1 change a a int unique;
37 ERROR 23000: Duplicate entry '1' for key 'a'
38 set @@session.binlog_alter_two_phase = 0;
39 alter table t1 change a a int;
40 set @@session.binlog_alter_two_phase = 1;
41 alter table t1 change a a int;
42 show create table t1;
43 Table Create Table
44 t1 CREATE TABLE `t1` (
45 `a` int(11) DEFAULT NULL,
46 `b` int(11) DEFAULT NULL,
47 `c` int(11) DEFAULT NULL
48 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
49 include/save_master_gtid.inc
50 connection slave_node;
51 include/sync_with_master_gtid.inc
52 show create table t1;
53 Table Create Table
54 t1 CREATE TABLE `t1` (
55 `a` int(11) DEFAULT NULL,
56 `b` int(11) DEFAULT NULL,
57 `c` int(11) DEFAULT NULL
58 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
59 connection master_node;
60 drop table t1;
61 include/save_master_gtid.inc
62 connection slave_node;
63 include/sync_with_master_gtid.inc
64 # innodb
65 connection master_node;
66 create table t1(a int, b int) engine=innodb;;
67 insert into t1 values(1,1);
68 insert into t1 values(2,2);
69 # Normal Alter
70 alter table t1 add column c int;
71 show create table t1;
72 Table Create Table
73 t1 CREATE TABLE `t1` (
74 `a` int(11) DEFAULT NULL,
75 `b` int(11) DEFAULT NULL,
76 `c` int(11) DEFAULT NULL
77 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
78 # Failed Alter
79 insert into t1 values(1,1, NULL);
80 alter table t1 change a a int unique;
81 ERROR 23000: Duplicate entry '1' for key 'a'
82 set @@session.binlog_alter_two_phase = 0;
83 alter table t1 change a a int;
84 set @@session.binlog_alter_two_phase = 1;
85 alter table t1 change a a int;
86 show create table t1;
87 Table Create Table
88 t1 CREATE TABLE `t1` (
89 `a` int(11) DEFAULT NULL,
90 `b` int(11) DEFAULT NULL,
91 `c` int(11) DEFAULT NULL
92 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
93 include/save_master_gtid.inc
94 connection slave_node;
95 include/sync_with_master_gtid.inc
96 show create table t1;
97 Table Create Table
98 t1 CREATE TABLE `t1` (
99 `a` int(11) DEFAULT NULL,
100 `b` int(11) DEFAULT NULL,
101 `c` int(11) DEFAULT NULL
102 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
103 connection master_node;
104 drop table t1;
105 include/save_master_gtid.inc
106 connection slave_node;
107 include/sync_with_master_gtid.inc
108 # aria
109 connection master_node;
110 create table t1(a int, b int) engine=aria;;
111 insert into t1 values(1,1);
112 insert into t1 values(2,2);
113 # Normal Alter
114 alter table t1 add column c int;
115 show create table t1;
116 Table Create Table
117 t1 CREATE TABLE `t1` (
118 `a` int(11) DEFAULT NULL,
119 `b` int(11) DEFAULT NULL,
120 `c` int(11) DEFAULT NULL
121 ) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1
122 # Failed Alter
123 insert into t1 values(1,1, NULL);
124 alter table t1 change a a int unique;
125 ERROR 23000: Duplicate entry '1' for key 'a'
126 set @@session.binlog_alter_two_phase = 0;
127 alter table t1 change a a int;
128 set @@session.binlog_alter_two_phase = 1;
129 alter table t1 change a a int;
130 show create table t1;
131 Table Create Table
132 t1 CREATE TABLE `t1` (
133 `a` int(11) DEFAULT NULL,
134 `b` int(11) DEFAULT NULL,
135 `c` int(11) DEFAULT NULL
136 ) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1
137 include/save_master_gtid.inc
138 connection slave_node;
139 include/sync_with_master_gtid.inc
140 show create table t1;
141 Table Create Table
142 t1 CREATE TABLE `t1` (
143 `a` int(11) DEFAULT NULL,
144 `b` int(11) DEFAULT NULL,
145 `c` int(11) DEFAULT NULL
146 ) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1
147 connection master_node;
148 drop table t1;
149 include/save_master_gtid.inc
150 connection slave_node;
151 include/sync_with_master_gtid.inc
152 # concurrent alter Myisam
153 # Sync slave
154 include/save_master_gtid.inc
155 include/sync_with_master_gtid.inc
156 # Sync slave
157 include/save_master_gtid.inc
158 include/sync_with_master_gtid.inc
159 # Concurrent DML
160 # Sync slave
161 include/save_master_gtid.inc
162 include/sync_with_master_gtid.inc
163 # Rollback tests
164 ERROR 23000: Duplicate entry '2' for key 'b'
165 ERROR 23000: Duplicate entry '2' for key 'b'
166 ERROR 23000: Duplicate entry '2' for key 'b'
167 ERROR 23000: Duplicate entry '2' for key 'b'
168 ERROR 23000: Duplicate entry '2' for key 'b'
169 ERROR 23000: Duplicate entry '2' for key 'b'
170 ERROR 23000: Duplicate entry '2' for key 'b'
171 ERROR 23000: Duplicate entry '2' for key 'b'
172 ERROR 23000: Duplicate entry '2' for key 'b'
173 ERROR 23000: Duplicate entry '2' for key 'b'
174 # Sync slave
175 include/save_master_gtid.inc
176 include/sync_with_master_gtid.inc
177 # diff_table of master and slave , we will do only in the case when
178 # sync_slave is on
179 include/diff_tables.inc [master_node:t1, slave_node:t1]
180 include/diff_tables.inc [master_node:t2, slave_node:t2]
181 include/diff_tables.inc [master_node:t3, slave_node:t3]
182 include/diff_tables.inc [master_node:t4, slave_node:t4]
183 include/diff_tables.inc [master_node:t5, slave_node:t5]
184 include/diff_tables.inc [master_node:t6, slave_node:t6]
185 include/diff_tables.inc [master_node:t7, slave_node:t7]
186 include/diff_tables.inc [master_node:t8, slave_node:t8]
187 include/diff_tables.inc [master_node:t9, slave_node:t9]
188 include/diff_tables.inc [master_node:t10, slave_node:t10]
189 # Sync slave
190 include/save_master_gtid.inc
191 include/sync_with_master_gtid.inc
192 # concurrent alter Aria
193 # Sync slave
194 include/save_master_gtid.inc
195 include/sync_with_master_gtid.inc
196 # Sync slave
197 include/save_master_gtid.inc
198 include/sync_with_master_gtid.inc
199 # Concurrent DML
200 # Sync slave
201 include/save_master_gtid.inc
202 include/sync_with_master_gtid.inc
203 # Rollback tests
204 ERROR 23000: Duplicate entry '2' for key 'b'
205 ERROR 23000: Duplicate entry '2' for key 'b'
206 ERROR 23000: Duplicate entry '2' for key 'b'
207 ERROR 23000: Duplicate entry '2' for key 'b'
208 ERROR 23000: Duplicate entry '2' for key 'b'
209 ERROR 23000: Duplicate entry '2' for key 'b'
210 ERROR 23000: Duplicate entry '2' for key 'b'
211 ERROR 23000: Duplicate entry '2' for key 'b'
212 ERROR 23000: Duplicate entry '2' for key 'b'
213 ERROR 23000: Duplicate entry '2' for key 'b'
214 # Sync slave
215 include/save_master_gtid.inc
216 include/sync_with_master_gtid.inc
217 # diff_table of master and slave , we will do only in the case when
218 # sync_slave is on
219 include/diff_tables.inc [master_node:t1, slave_node:t1]
220 include/diff_tables.inc [master_node:t2, slave_node:t2]
221 include/diff_tables.inc [master_node:t3, slave_node:t3]
222 include/diff_tables.inc [master_node:t4, slave_node:t4]
223 include/diff_tables.inc [master_node:t5, slave_node:t5]
224 include/diff_tables.inc [master_node:t6, slave_node:t6]
225 include/diff_tables.inc [master_node:t7, slave_node:t7]
226 include/diff_tables.inc [master_node:t8, slave_node:t8]
227 include/diff_tables.inc [master_node:t9, slave_node:t9]
228 include/diff_tables.inc [master_node:t10, slave_node:t10]
229 # Sync slave
230 include/save_master_gtid.inc
231 include/sync_with_master_gtid.inc
232 # concurrent alter Innodb copy
233 # Sync slave
234 include/save_master_gtid.inc
235 include/sync_with_master_gtid.inc
236 # Sync slave
237 include/save_master_gtid.inc
238 include/sync_with_master_gtid.inc
239 # Concurrent DML
240 # Sync slave
241 include/save_master_gtid.inc
242 include/sync_with_master_gtid.inc
243 # Rollback tests
244 ERROR 23000: Duplicate entry '2' for key 'b'
245 ERROR 23000: Duplicate entry '2' for key 'b'
246 ERROR 23000: Duplicate entry '2' for key 'b'
247 ERROR 23000: Duplicate entry '2' for key 'b'
248 ERROR 23000: Duplicate entry '2' for key 'b'
249 ERROR 23000: Duplicate entry '2' for key 'b'
250 ERROR 23000: Duplicate entry '2' for key 'b'
251 ERROR 23000: Duplicate entry '2' for key 'b'
252 ERROR 23000: Duplicate entry '2' for key 'b'
253 ERROR 23000: Duplicate entry '2' for key 'b'
254 # Sync slave
255 include/save_master_gtid.inc
256 include/sync_with_master_gtid.inc
257 # diff_table of master and slave , we will do only in the case when
258 # sync_slave is on
259 include/diff_tables.inc [master_node:t1, slave_node:t1]
260 include/diff_tables.inc [master_node:t2, slave_node:t2]
261 include/diff_tables.inc [master_node:t3, slave_node:t3]
262 include/diff_tables.inc [master_node:t4, slave_node:t4]
263 include/diff_tables.inc [master_node:t5, slave_node:t5]
264 include/diff_tables.inc [master_node:t6, slave_node:t6]
265 include/diff_tables.inc [master_node:t7, slave_node:t7]
266 include/diff_tables.inc [master_node:t8, slave_node:t8]
267 include/diff_tables.inc [master_node:t9, slave_node:t9]
268 include/diff_tables.inc [master_node:t10, slave_node:t10]
269 # Sync slave
270 include/save_master_gtid.inc
271 include/sync_with_master_gtid.inc
272 # concurrent alter Innodb Inplace
273 # Sync slave
274 include/save_master_gtid.inc
275 include/sync_with_master_gtid.inc
276 # Sync slave
277 include/save_master_gtid.inc
278 include/sync_with_master_gtid.inc
279 # Concurrent DML
280 # Sync slave
281 include/save_master_gtid.inc
282 include/sync_with_master_gtid.inc
283 # Sync slave
284 include/save_master_gtid.inc
285 include/sync_with_master_gtid.inc
286 # Rollback tests
287 ERROR 23000: Duplicate entry '2' for key 'b'
288 ERROR 23000: Duplicate entry '2' for key 'b'
289 ERROR 23000: Duplicate entry '2' for key 'b'
290 ERROR 23000: Duplicate entry '2' for key 'b'
291 ERROR 23000: Duplicate entry '2' for key 'b'
292 ERROR 23000: Duplicate entry '2' for key 'b'
293 ERROR 23000: Duplicate entry '2' for key 'b'
294 ERROR 23000: Duplicate entry '2' for key 'b'
295 ERROR 23000: Duplicate entry '2' for key 'b'
296 ERROR 23000: Duplicate entry '2' for key 'b'
297 # Sync slave
298 include/save_master_gtid.inc
299 include/sync_with_master_gtid.inc
300 # diff_table of master and slave , we will do only in the case when
301 # sync_slave is on
302 include/diff_tables.inc [master_node:t1, slave_node:t1]
303 include/diff_tables.inc [master_node:t2, slave_node:t2]
304 include/diff_tables.inc [master_node:t3, slave_node:t3]
305 include/diff_tables.inc [master_node:t4, slave_node:t4]
306 include/diff_tables.inc [master_node:t5, slave_node:t5]
307 include/diff_tables.inc [master_node:t6, slave_node:t6]
308 include/diff_tables.inc [master_node:t7, slave_node:t7]
309 include/diff_tables.inc [master_node:t8, slave_node:t8]
310 include/diff_tables.inc [master_node:t9, slave_node:t9]
311 include/diff_tables.inc [master_node:t10, slave_node:t10]
312 # Sync slave
313 include/save_master_gtid.inc
314 include/sync_with_master_gtid.inc
315 connection master;
316 include/save_master_gtid.inc
317 connection slave;
318 include/sync_with_master_gtid.inc
319 # cleanup
320 include/stop_slave.inc
321 set global slave_parallel_threads = 0;;
322 set global slave_parallel_mode = optimistic;;
323 set global gtid_strict_mode = 0;;
324 set global slave_domain_parallel_threads = 0;;
325 set global gtid_domain_id= 0;
326 include/start_slave.inc
327 connection master;
328 set global binlog_alter_two_phase=0;;
329 set global gtid_domain_id= 0;
330 include/rpl_end.inc