Debian Codegraph @

mysql-test/suite/rpl_ndb/r/rpl_ndb_extra_col_slave.result

raw
1 include/master-slave.inc
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 master]
6 CALL mtr.add_suppression("Replica: .*Duplicate column name");
7 call mtr.add_suppression("Replica: Unknown table 'test.t6' Error_code: 1051");
8 call mtr.add_suppression("Replica SQL.*Column [0-9] of table .test.t[0-9]*. cannot be converted from type.* Error_code: MY-013146");
9 call mtr.add_suppression("The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
10 **** Diff Table Def Start ****
11 *** On Slave ***
12 STOP SLAVE;
13 Warnings:
14 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
15 SET @saved_replica_type_conversions = @@replica_type_conversions;
16 SET GLOBAL REPLICA_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
17 CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20),
18 d FLOAT DEFAULT '2.00',
19 e CHAR(4) DEFAULT 'TEST')
20 ENGINE='NDB';
21 *** Create t1 on Master ***
22 CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(10)
23 ) ENGINE='NDB';
24 *** Start Slave ***
25 include/rpl_reset.inc
26 *** Master Data Insert ***
27 INSERT INTO t1 () VALUES(1,2,'TEXAS'),(2,1,'AUSTIN'),(3,4,'QA');
28 SELECT * FROM t1 ORDER BY a;
29 a b c
30 1 2 TEXAS
31 2 1 AUSTIN
32 3 4 QA
33 *** Select from slave ***
34 SELECT * FROM t1 ORDER BY a;
35 a b c d e
36 1 2 TEXAS 2 TEST
37 2 1 AUSTIN 2 TEST
38 3 4 QA 2 TEST
39 SET GLOBAL REPLICA_TYPE_CONVERSIONS = @saved_replica_type_conversions;
40 *** Drop t1 ***
41 DROP TABLE t1;
42 *** Create t2 on slave ***
43 STOP SLAVE;
44 Warnings:
45 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
46 CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5),
47 d FLOAT DEFAULT '2.00',
48 e CHAR(5) DEFAULT 'TEST2')
49 ENGINE='NDB';
50 *** Create t2 on Master ***
51 CREATE TABLE t2 (a INT PRIMARY KEY, b INT, c CHAR(10)
52 ) ENGINE='NDB';
53 *** Start Slave ***
54 include/rpl_reset.inc
55 *** Master Data Insert ***
56 INSERT INTO t2 () VALUES(1,2,'Kyle, TEX'),(2,1,'JOE AUSTIN'),(3,4,'QA TESTING');
57 SELECT * FROM t2 ORDER BY a;
58 a b c
59 1 2 Kyle, TEX
60 2 1 JOE AUSTIN
61 3 4 QA TESTING
62 include/wait_for_slave_sql_error.inc [errno=13146]
63 STOP SLAVE;
64 Warnings:
65 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
66 include/rpl_reset.inc
67 SELECT * FROM t2 ORDER BY a;
68 a b c d e
69 *** Drop t2 ***
70 DROP TABLE t2;
71 *** Create t3 on slave ***
72 STOP SLAVE;
73 Warnings:
74 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
75 CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20),
76 d FLOAT DEFAULT '2.00',
77 e CHAR(5) DEFAULT 'TEST2')
78 ENGINE='NDB';
79 *** Create t3 on Master ***
80 CREATE TABLE t3 (a BLOB, b INT PRIMARY KEY, c CHAR(20)
81 ) ENGINE='NDB';
82 *** Start Slave ***
83 include/rpl_reset.inc
84 *** Master Data Insert ***
85 set @b1 = 'b1';
86 set @b1 = concat(@b1,@b1);
87 INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING');
88 ******************************************************************
89 *** Expect slave to fail with Error ER_REPLICA_CONVERSION_FAILED ***
90 ******************************************************************
91 include/wait_for_slave_sql_error_and_skip.inc [errno=13146]
92 *** Drop t3 ***
93 DROP TABLE t3;
94 *** Create t4 on slave ***
95 STOP SLAVE;
96 Warnings:
97 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
98 CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20),
99 d FLOAT DEFAULT '2.00',
100 e CHAR(5) DEFAULT 'TEST2')
101 ENGINE='NDB';
102 *** Create t4 on Master ***
103 CREATE TABLE t4 (a DECIMAL(8,2), b INT PRIMARY KEY, c CHAR(20)
104 ) ENGINE='NDB';
105 *** Start Slave ***
106 include/rpl_reset.inc
107 *** Master Data Insert ***
108 INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
109 (30000.22,4,'QA TESTING');
110 ******************************************************************
111 *** Expect slave to fail with Error ER_REPLICA_CONVERSION_FAILED ***
112 ******************************************************************
113 include/wait_for_slave_sql_error_and_skip.inc [errno=13146]
114 *** Drop t4 ***
115 DROP TABLE t4;
116 *** Create t5 on slave ***
117 STOP SLAVE;
118 Warnings:
119 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
120 CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5),
121 c FLOAT, d INT, e DOUBLE,
122 f DECIMAL(8,2))ENGINE='NDB';
123 *** Create t5 on Master ***
124 CREATE TABLE t5 (a INT PRIMARY KEY, b VARCHAR(6),
125 c DECIMAL(8,2), d BIT, e BLOB,
126 f FLOAT) ENGINE='NDB';
127 *** Start Slave ***
128 include/rpl_reset.inc
129 *** Master Data Insert ***
130 INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
131 (2,'JOE',300.01,0,'b2b2',1.0000009);
132 ******************************************************************
133 *** Expect slave to fail with Error ER_REPLICA_CONVERSION_FAILED ***
134 ******************************************************************
135 include/wait_for_slave_sql_error_and_skip.inc [errno=13146]
136 *** Drop t5 ***
137 DROP TABLE t5;
138 *** Create t6 on slave ***
139 STOP SLAVE;
140 Warnings:
141 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
142 CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5),
143 c FLOAT, d INT)ENGINE='NDB';
144 *** Create t6 on Master ***
145 CREATE TABLE t6 (a INT PRIMARY KEY, b VARCHAR(6),
146 c DECIMAL(8,2), d BIT
147 ) ENGINE='NDB';
148 *** Start Slave ***
149 include/rpl_reset.inc
150 *** Master Data Insert ***
151 INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
152 (2,'JOE',300.01,0);
153 ******************************************************************
154 *** Expect slave to fail with Error ER_REPLICA_CONVERSION_FAILED ***
155 ******************************************************************
156 include/wait_for_slave_sql_error_and_skip.inc [errno=13146]
157 *** Drop t6 ***
158 include/rpl_reset.inc
159 DROP TABLE t6;
160 **** Diff Table Def End ****
161 **** Extra Colums Start ****
162 *** Create t7 on slave ***
163 STOP SLAVE;
164 Warnings:
165 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
166 SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
167 CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5),
168 d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
169 e CHAR(20) DEFAULT 'Extra Column Testing')
170 ENGINE='NDB';
171 *** Create t7 on Master ***
172 CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
173 ) ENGINE='NDB';
174 *** Start Slave ***
175 include/rpl_reset.inc
176 *** Master Data Insert ***
177 set @b1 = 'b1';
178 set @b1 = concat(@b1,@b1);
179 INSERT INTO t7 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
180 SELECT * FROM t7 ORDER BY a;
181 a b c
182 1 b1b1 Kyle
183 2 b1b1 JOE
184 3 b1b1 QA
185 *** Select from slave ***
186 SELECT * FROM t7 ORDER BY a;
187 a b c d e
188 1 b1b1 Kyle 0000-00-00 00:00:00 Extra Column Testing
189 2 b1b1 JOE 0000-00-00 00:00:00 Extra Column Testing
190 3 b1b1 QA 0000-00-00 00:00:00 Extra Column Testing
191 *** Drop t7 ***
192 DROP TABLE t7;
193 *** Create t8 on slave ***
194 STOP SLAVE;
195 Warnings:
196 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
197 CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5),
198 d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
199 e INT)ENGINE='NDB';
200 SET sql_mode = default;
201 *** Create t8 on Master ***
202 CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
203 ) ENGINE='NDB';
204 *** Start Slave ***
205 include/rpl_reset.inc
206 *** Master Data Insert ***
207 set @b1 = 'b1b1b1b1';
208 set @b1 = concat(@b1,@b1);
209 INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
210 *** Drop t8 ***
211 DROP TABLE t8;
212 *** Create t10 on slave ***
213 STOP SLAVE;
214 Warnings:
215 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
216 CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233',
217 c CHAR(5), e INT DEFAULT '1')ENGINE='NDB';
218 *** Create t10 on Master ***
219 CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
220 ) ENGINE='NDB';
221 *** Start Slave ***
222 include/rpl_reset.inc
223 *** Master Data Insert ***
224 set @b1 = 'b1b1b1b1';
225 set @b1 = concat(@b1,@b1);
226 INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
227 ******************************************************************
228 *** Expect slave to fail with Error ER_REPLICA_CONVERSION_FAILED ***
229 ******************************************************************
230 include/wait_for_slave_sql_error_and_skip.inc [errno=13146]
231 *** Drop t10 ***
232 DROP TABLE t10;
233 *** Create t11 on slave ***
234 STOP SLAVE;
235 Warnings:
236 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
237 CREATE TABLE t11 (a INT KEY, b BLOB, f INT,
238 c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB';
239 *** Create t11 on Master ***
240 CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
241 ) ENGINE='NDB';
242 *** Start Slave ***
243 include/rpl_reset.inc
244 *** Master Data Insert ***
245 set @b1 = 'b1b1b1b1';
246 set @b1 = concat(@b1,@b1);
247 INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
248 ******************************************************************
249 *** Expect slave to fail with Error ER_REPLICA_CONVERSION_FAILED ***
250 ******************************************************************
251 include/wait_for_slave_sql_error_and_skip.inc [errno=13146]
252 *** Drop t11 ***
253 DROP TABLE t11;
254 *** Create t12 on slave ***
255 STOP SLAVE;
256 Warnings:
257 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
258 CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT,
259 c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB';
260 *** Create t12 on Master ***
261 CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB
262 ) ENGINE='NDB';
263 *** Start Slave ***
264 include/rpl_reset.inc
265 *** Master Data Insert ***
266 set @b1 = 'b1b1b1b1';
267 set @b1 = concat(@b1,@b1);
268 INSERT INTO t12 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
269 SELECT * FROM t12 ORDER BY a;
270 a b c
271 1 b1b1b1b1b1b1b1b1 Kyle
272 2 b1b1b1b1b1b1b1b1 JOE
273 3 b1b1b1b1b1b1b1b1 QA
274 *** Select on Slave ***
275 SELECT * FROM t12 ORDER BY a;
276 a b f c e
277 1 b1b1b1b1b1b1b1b1 Kyle test 1
278 2 b1b1b1b1b1b1b1b1 JOE test 1
279 3 b1b1b1b1b1b1b1b1 QA test 1
280 *** Drop t12 ***
281 DROP TABLE t12;
282 **** Extra Colums End ****
283 *** BUG 22177 Start ***
284 *** Create t13 on slave ***
285 STOP SLAVE;
286 Warnings:
287 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
288 CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5),
289 d INT DEFAULT '1',
290 e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
291 )ENGINE='NDB';
292 *** Create t13 on Master ***
293 CREATE TABLE t13 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
294 ) ENGINE='NDB';
295 *** Start Slave ***
296 include/rpl_reset.inc
297 *** Master Data Insert ***
298 set @b1 = 'b1b1b1b1';
299 set @b1 = concat(@b1,@b1);
300 INSERT INTO t13 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
301 SELECT * FROM t13 ORDER BY a;
302 a b c
303 1 b1b1b1b1b1b1b1b1 Kyle
304 2 b1b1b1b1b1b1b1b1 JOE
305 3 b1b1b1b1b1b1b1b1 QA
306 *** Select on Slave ****
307 SELECT * FROM t13 ORDER BY a;
308 a b c d e
309 1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
310 2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
311 3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
312 *** Drop t13 ***
313 DROP TABLE t13;
314 *** 22117 END ***
315 *** Alter Master Table Testing Start ***
316 *** Create t14 on slave ***
317 STOP SLAVE;
318 Warnings:
319 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
320 CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
321 c6 INT DEFAULT '1',
322 c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
323 )ENGINE='NDB';
324 *** Create t14 on Master ***
325 CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
326 ) ENGINE='NDB';
327 *** Start Slave ***
328 include/rpl_reset.inc
329 *** Master Data Insert ***
330 ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1;
331 ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2;
332 set @b1 = 'b1b1b1b1';
333 set @b1 = concat(@b1,@b1);
334 INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'),
335 (2,2.00,'This Test Should work',@b1,'JOE'),
336 (3,3.00,'If is does not, I will open a bug',@b1,'QA');
337 SELECT * FROM t14 ORDER BY c1;
338 c1 c2 c3 c4 c5
339 1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle
340 2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE
341 3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA
342 *** Select on Slave ****
343 SELECT * FROM t14 ORDER BY c1;
344 c1 c2 c3 c4 c5 c6 c7
345 1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
346 2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
347 3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
348 *** Create t14a on slave ***
349 STOP SLAVE;
350 Warnings:
351 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
352 CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
353 c6 INT DEFAULT '1',
354 c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
355 )ENGINE='NDB';
356 *** Create t14a on Master ***
357 CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
358 ) ENGINE='NDB';
359 *** Start Slave ***
360 include/rpl_reset.inc
361 *** Master Data Insert ***
362 set @b1 = 'b1b1b1b1';
363 set @b1 = concat(@b1,@b1);
364 INSERT INTO t14a () VALUES(1,@b1,'Kyle'),
365 (2,@b1,'JOE'),
366 (3,@b1,'QA');
367 SELECT * FROM t14a ORDER BY c1;
368 c1 c4 c5
369 1 b1b1b1b1b1b1b1b1 Kyle
370 2 b1b1b1b1b1b1b1b1 JOE
371 3 b1b1b1b1b1b1b1b1 QA
372 *** Select on Slave ****
373 SELECT * FROM t14a ORDER BY c1;
374 c1 c4 c5 c6 c7
375 1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
376 2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
377 3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
378 STOP SLAVE;
379 Warnings:
380 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
381 *** Master Drop c5 ***
382 ALTER TABLE t14a DROP COLUMN c5;
383 *** Start Slave ***
384 include/rpl_reset.inc
385 *** Master Data Insert ***
386 set @b1 = 'b1b1b1b1';
387 set @b1 = concat(@b1,@b1);
388 INSERT INTO t14a () VALUES(4,@b1),
389 (5,@b1),
390 (6,@b1);
391 SELECT * FROM t14a ORDER BY c1;
392 c1 c4
393 1 b1b1b1b1b1b1b1b1
394 2 b1b1b1b1b1b1b1b1
395 3 b1b1b1b1b1b1b1b1
396 4 b1b1b1b1b1b1b1b1
397 5 b1b1b1b1b1b1b1b1
398 6 b1b1b1b1b1b1b1b1
399 *** Select on Slave ****
400 SELECT * FROM t14a ORDER BY c1;
401 c1 c4 c5 c6 c7
402 1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
403 2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
404 3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
405 4 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
406 5 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
407 6 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
408 DROP TABLE t14a;
409 *** connect to master and drop columns ***
410 ALTER TABLE t14 DROP COLUMN c2;
411 ALTER TABLE t14 DROP COLUMN c4;
412 *** Select from Master ***
413 SELECT * FROM t14 ORDER BY c1;
414 c1 c3 c5
415 1 Replication Testing Extra Col Kyle
416 2 This Test Should work JOE
417 3 If is does not, I will open a bug QA
418 *** Select from Slave ***
419 SELECT * FROM t14 ORDER BY c1;
420 c1 c3 c5 c6 c7
421 1 Replication Testing Extra Col Kyle 1 CURRENT_TIMESTAMP
422 2 This Test Should work JOE 1 CURRENT_TIMESTAMP
423 3 If is does not, I will open a bug QA 1 CURRENT_TIMESTAMP
424 *** Drop t14 ***
425 DROP TABLE t14;
426 *** Create t15 on slave ***
427 STOP SLAVE;
428 Warnings:
429 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
430 CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT,
431 c4 BLOB, c5 CHAR(5),
432 c6 INT DEFAULT '1',
433 c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
434 )ENGINE='NDB';
435 *** Create t15 on Master ***
436 CREATE TABLE t15 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT,
437 c4 BLOB, c5 CHAR(5)) ENGINE='NDB';
438 *** Start Slave ***
439 include/rpl_reset.inc
440 call mtr.add_suppression("Error .Unknown table .t6.. on query.* Error_code: 1051");
441 call mtr.add_suppression("Error .Duplicate column name .c6.. on query.* Error_code: MY-001060");
442 call mtr.add_suppression("Table definition on source and replica does not match: Column . ...e mismatch.* Error_code: 1535");
443 *** Master Data Insert ***
444 set @b1 = 'b1b1b1b1';
445 set @b1 = concat(@b1,@b1);
446 INSERT INTO t15 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'),
447 (2,2.00,'This Test Should work',@b1,'JOE'),
448 (3,3.00,'If is does not, I will open a bug',@b1,'QA');
449 SELECT * FROM t15 ORDER BY c1;
450 c1 c2 c3 c4 c5
451 1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle
452 2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE
453 3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA
454 *** Select on Slave ****
455 SELECT * FROM t15 ORDER BY c1;
456 c1 c2 c3 c4 c5 c6 c7
457 1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
458 2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
459 3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
460 *** Add column on master that is a Extra on Slave ***
461 ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
462 Warnings:
463 Warning 1478 Converted FIXED field 'c6' to DYNAMIC to enable online ADD COLUMN
464 ********************************************************
465 *** Expect slave to fail with Error ER_DUP_FIELDNAME ***
466 ********************************************************
467 include/wait_for_slave_sql_error_and_skip.inc [errno=1060]
468 *** Try to insert in master ****
469 INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2);
470 SELECT * FROM t15 ORDER BY c1;
471 c1 c2 c3 c4 c5 c6
472 1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL
473 2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL
474 3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL
475 5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2
476 *** Try to select from slave ****
477 SELECT * FROM t15 ORDER BY c1;
478 c1 c2 c3 c4 c5 c6 c7
479 1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
480 2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
481 3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
482 5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 CURRENT_TIMESTAMP
483 *** DROP TABLE t15 ***
484 DROP TABLE t15;
485 *** Create t16 on slave ***
486 STOP SLAVE;
487 Warnings:
488 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
489 CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT,
490 c4 BLOB, c5 CHAR(5),
491 c6 INT DEFAULT '1',
492 c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
493 )ENGINE='NDB';
494 *** Create t16 on Master ***
495 CREATE TABLE t16 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT,
496 c4 BLOB, c5 CHAR(5))ENGINE='NDB';
497 *** Start Slave ***
498 include/rpl_reset.inc
499 *** Master Data Insert ***
500 set @b1 = 'b1b1b1b1';
501 set @b1 = concat(@b1,@b1);
502 INSERT INTO t16 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'),
503 (2,2.00,'This Test Should work',@b1,'JOE'),
504 (3,3.00,'If is does not, I will open a bug',@b1,'QA');
505 SELECT * FROM t16 ORDER BY c1;
506 c1 c2 c3 c4 c5
507 1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle
508 2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE
509 3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA
510 *** Select on Slave ****
511 SELECT * FROM t16 ORDER BY c1;
512 c1 c2 c3 c4 c5 c6 c7
513 1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
514 2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
515 3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
516 *** Add Partition on master if native partitioning is supported ***
517 ALTER TABLE t16 PARTITION BY KEY(c1) PARTITIONS 4;
518 INSERT INTO t16 () VALUES(4,1.00,'Replication Rocks',@b1,'Omer');
519 SHOW CREATE TABLE t16;
520 Table Create Table
521 t16 CREATE TABLE `t16` (
522 `c1` int NOT NULL,
523 `c2` decimal(8,2) DEFAULT NULL,
524 `c3` text,
525 `c4` blob,
526 `c5` char(5) DEFAULT NULL,
527 PRIMARY KEY (`c1`)
528 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
529 /*!50100 PARTITION BY KEY (c1)
530 PARTITIONS 4 */
531 *** Show table on Slave ****
532 SHOW CREATE TABLE t16;
533 Table Create Table
534 t16 CREATE TABLE `t16` (
535 `c1` int NOT NULL,
536 `c2` decimal(8,2) DEFAULT NULL,
537 `c3` text,
538 `c4` blob,
539 `c5` char(5) DEFAULT NULL,
540 `c6` int DEFAULT '1',
541 `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
542 PRIMARY KEY (`c1`)
543 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
544 /*!50100 PARTITION BY KEY (c1)
545 PARTITIONS 4 */
546 *** DROP TABLE t16 ***
547 DROP TABLE t16;
548 *** Alter Master End ***
549 *** Create t17 on slave ***
550 STOP SLAVE;
551 Warnings:
552 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
553 CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5),
554 d FLOAT DEFAULT '2.00',
555 e CHAR(5) DEFAULT 'TEST2')
556 ENGINE='NDB';
557 *** Create t17 on Master ***
558 CREATE TABLE t17 (a BIGINT PRIMARY KEY, b INT, c CHAR(10)
559 ) ENGINE='NDB';
560 *** Start Slave ***
561 include/rpl_reset.inc
562 *** Master Data Insert ***
563 INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
564 ******************************************************************
565 *** Expect slave to fail with Error ER_REPLICA_CONVERSION_FAILED ***
566 ******************************************************************
567 include/wait_for_slave_sql_error_and_skip.inc [errno=13146]
568 ** DROP table t17 ***
569 DROP TABLE t17;
570 include/rpl_end.inc