Debian Codegraph @

mysql-test/suite/ndb_rpl/r/ndb_rpl_2other.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 SET default_storage_engine=ndb;
7
8 === NDB -> MYISAM ===
9
10 [connection slave]
11 set @old_replica_exec_mode= @@global.replica_exec_mode;
12 set @@global.replica_exec_mode= 'IDEMPOTENT';
13 CREATE TABLE mysql.ndb_apply_status
14 ( server_id INT UNSIGNED NOT NULL,
15 epoch BIGINT UNSIGNED NOT NULL,
16 log_name VARBINARY(255) NOT NULL,
17 start_pos BIGINT UNSIGNED NOT NULL,
18 end_pos BIGINT UNSIGNED NOT NULL,
19 PRIMARY KEY USING HASH (server_id)) ENGINE=MYISAM
20 CHARACTER SET latin1;
21 SET @old_slave_storage_engine=@@global.default_storage_engine;
22 SET @@global.default_storage_engine=myisam;
23 include/start_slave.inc
24 --- Create Table Section ---
25 CREATE TABLE t1 (id MEDIUMINT NOT NULL,
26 b1 INT,
27 vc VARCHAR(255),
28 bc CHAR(255),
29 d DECIMAL(10,4) DEFAULT 0,
30 f FLOAT DEFAULT 0,
31 total BIGINT UNSIGNED,
32 y YEAR,
33 t DATE,
34 PRIMARY KEY(id));
35 --- Show table on master ---
36 SHOW CREATE TABLE t1;
37 Table Create Table
38 t1 CREATE TABLE `t1` (
39 `id` mediumint NOT NULL,
40 `b1` int DEFAULT NULL,
41 `vc` varchar(255) DEFAULT NULL,
42 `bc` char(255) DEFAULT NULL,
43 `d` decimal(10,4) DEFAULT '0.0000',
44 `f` float DEFAULT '0',
45 `total` bigint unsigned DEFAULT NULL,
46 `y` year DEFAULT NULL,
47 `t` date DEFAULT NULL,
48 PRIMARY KEY (`id`)
49 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
50 --- Show table on slave ---
51 SHOW CREATE TABLE t1;
52 Table Create Table
53 t1 CREATE TABLE `t1` (
54 `id` mediumint NOT NULL,
55 `b1` int DEFAULT NULL,
56 `vc` varchar(255) DEFAULT NULL,
57 `bc` char(255) DEFAULT NULL,
58 `d` decimal(10,4) DEFAULT '0.0000',
59 `f` float DEFAULT '0',
60 `total` bigint unsigned DEFAULT NULL,
61 `y` year DEFAULT NULL,
62 `t` date DEFAULT NULL,
63 PRIMARY KEY (`id`)
64 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
65 STOP SLAVE;
66 Warnings:
67 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
68 RESET SLAVE;
69 Warnings:
70 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
71 RESET MASTER;
72 START SLAVE;
73 Warnings:
74 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
75 --- Populate t1 with data ---
76 --- Select from t1 on master ---
77 select *
78 from t1
79 order by id;
80 id b1 vc bc d f total y t
81 2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
82 4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
83 42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
84 142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
85 412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
86 --- Select from t1 on slave ---
87 select *
88 from t1
89 order by id;
90 id b1 vc bc d f total y t
91 2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
92 4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
93 42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
94 142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
95 412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
96 --- Perform basic operation on master ---
97 --- and ensure replicated correctly ---
98 --- Update t1 on master --
99 UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22"
100 WHERE id < 100
101 ORDER BY id;
102 --- Check the update on master ---
103 SELECT *
104 FROM t1
105 WHERE id < 100
106 ORDER BY id;
107 id b1 vc bc d f total y t
108 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
109 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
110 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
111 --- Check Update on slave ---
112 SELECT *
113 FROM t1
114 WHERE id < 100
115 ORDER BY id;
116 id b1 vc bc d f total y t
117 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
118 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
119 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
120 --- Remove a record from t1 on master ---
121 DELETE FROM t1 WHERE id = 412;
122 --- Show current count on master for t1 ---
123 SELECT COUNT(*) FROM t1;
124 COUNT(*)
125 4
126 --- Show current count on slave for t1 ---
127 SELECT COUNT(*) FROM t1;
128 COUNT(*)
129 4
130 TRUNCATE TABLE t1;
131 --- Check that simple Alter statements are replicated correctly --
132 ALTER TABLE t1 DROP PRIMARY KEY;
133 ALTER TABLE t1 MODIFY vc char(32);
134 --- Show the new improved table on the master ---
135 SHOW CREATE TABLE t1;
136 Table Create Table
137 t1 CREATE TABLE `t1` (
138 `id` mediumint NOT NULL,
139 `b1` int DEFAULT NULL,
140 `vc` char(32) DEFAULT NULL,
141 `bc` char(255) DEFAULT NULL,
142 `d` decimal(10,4) DEFAULT '0.0000',
143 `f` float DEFAULT '0',
144 `total` bigint unsigned DEFAULT NULL,
145 `y` year DEFAULT NULL,
146 `t` date DEFAULT NULL
147 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
148 --- Make sure that our tables on slave are still same engine ---
149 --- and that the alter statements replicated correctly ---
150 SHOW CREATE TABLE t1;
151 Table Create Table
152 t1 CREATE TABLE `t1` (
153 `id` mediumint NOT NULL,
154 `b1` int DEFAULT NULL,
155 `vc` char(32) DEFAULT NULL,
156 `bc` char(255) DEFAULT NULL,
157 `d` decimal(10,4) DEFAULT '0.0000',
158 `f` float DEFAULT '0',
159 `total` bigint unsigned DEFAULT NULL,
160 `y` year DEFAULT NULL,
161 `t` date DEFAULT NULL
162 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
163 Warnings:
164 Warning 3135 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
165 STOP SLAVE;
166 Warnings:
167 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
168 RESET SLAVE;
169 Warnings:
170 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
171 RESET MASTER;
172 START SLAVE;
173 Warnings:
174 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
175 --- Populate t1 with data ---
176 Warnings:
177 Warning 1265 Data truncated for column 'vc' at row 1
178 Warnings:
179 Warning 1265 Data truncated for column 'vc' at row 1
180 Warnings:
181 Warning 1265 Data truncated for column 'vc' at row 1
182 Warnings:
183 Warning 1265 Data truncated for column 'vc' at row 1
184 Warnings:
185 Warning 1265 Data truncated for column 'vc' at row 1
186 --- Select from t1 on master ---
187 select *
188 from t1
189 order by id;
190 id b1 vc bc d f total y t
191 2 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
192 4 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
193 42 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
194 142 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
195 412 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
196 --- Select from t1 on slave ---
197 select *
198 from t1
199 order by id;
200 id b1 vc bc d f total y t
201 2 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
202 4 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
203 42 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
204 142 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
205 412 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
206 --- Perform basic operation on master ---
207 --- and ensure replicated correctly ---
208 --- Update t1 on master --
209 UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22"
210 WHERE id < 100
211 ORDER BY id;
212 --- Check the update on master ---
213 SELECT *
214 FROM t1
215 WHERE id < 100
216 ORDER BY id;
217 id b1 vc bc d f total y t
218 2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
219 4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
220 42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
221 --- Check Update on slave ---
222 SELECT *
223 FROM t1
224 WHERE id < 100
225 ORDER BY id;
226 id b1 vc bc d f total y t
227 2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
228 4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
229 42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
230 --- Remove a record from t1 on master ---
231 DELETE FROM t1 WHERE id = 412;
232 --- Show current count on master for t1 ---
233 SELECT COUNT(*) FROM t1;
234 COUNT(*)
235 4
236 --- Show current count on slave for t1 ---
237 SELECT COUNT(*) FROM t1;
238 COUNT(*)
239 4
240 TRUNCATE TABLE t1;
241 --- Check that replication works when slave has more columns than master
242 ALTER TABLE t1 ADD PRIMARY KEY(id,total);
243 ALTER TABLE t1 MODIFY vc TEXT;
244 INSERT INTO t1 VALUES(3,1,'Testing MySQL databases is a cool ',
245 'Must make it bug free for the customer',
246 654321.4321,15.21,0,1965,"1905-11-14");
247 INSERT INTO t1 VALUES(20,1,'Testing MySQL databases is a cool ',
248 'Must make it bug free for the customer',
249 654321.4321,15.21,0,1965,"1965-11-14");
250 INSERT INTO t1 VALUES(50,1,'Testing MySQL databases is a cool ',
251 'Must make it bug free for the customer',
252 654321.4321,15.21,0,1965,"1985-11-14");
253 --- Add columns on slave ---
254 ALTER TABLE t1 ADD (u int, v char(16) default 'default');
255 UPDATE t1 SET u=7 WHERE id < 50;
256 UPDATE t1 SET v='explicit' WHERE id >10;
257 --- Show changed table on slave ---
258 SHOW CREATE TABLE t1;
259 Table Create Table
260 t1 CREATE TABLE `t1` (
261 `id` mediumint NOT NULL,
262 `b1` int DEFAULT NULL,
263 `vc` text,
264 `bc` char(255) DEFAULT NULL,
265 `d` decimal(10,4) DEFAULT '0.0000',
266 `f` float DEFAULT '0',
267 `total` bigint unsigned NOT NULL,
268 `y` year DEFAULT NULL,
269 `t` date DEFAULT NULL,
270 `u` int DEFAULT NULL,
271 `v` char(16) DEFAULT 'default',
272 PRIMARY KEY (`id`,`total`)
273 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
274 SELECT *
275 FROM t1
276 ORDER BY id;
277 id b1 vc bc d f total y t u v
278 3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 7 default
279 20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 7 explicit
280 50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL explicit
281 STOP SLAVE;
282 Warnings:
283 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
284 RESET SLAVE;
285 Warnings:
286 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
287 RESET MASTER;
288 START SLAVE;
289 Warnings:
290 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
291 --- Populate t1 with data ---
292 --- Select from t1 on master ---
293 select *
294 from t1
295 order by id;
296 id b1 vc bc d f total y t
297 2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
298 3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
299 4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
300 20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
301 42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
302 50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
303 142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
304 412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
305 --- Select from t1 on slave ---
306 select *
307 from t1
308 order by id;
309 id b1 vc bc d f total y t u v
310 2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 NULL default
311 3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 7 default
312 4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL default
313 20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 7 explicit
314 42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 NULL default
315 50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL explicit
316 142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 NULL default
317 412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 NULL default
318 --- Perform basic operation on master ---
319 --- and ensure replicated correctly ---
320 --- Update t1 on master --
321 UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22"
322 WHERE id < 100
323 ORDER BY id;
324 --- Check the update on master ---
325 SELECT *
326 FROM t1
327 WHERE id < 100
328 ORDER BY id;
329 id b1 vc bc d f total y t
330 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
331 3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
332 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
333 20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
334 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
335 50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
336 --- Check Update on slave ---
337 SELECT *
338 FROM t1
339 WHERE id < 100
340 ORDER BY id;
341 id b1 vc bc d f total y t u v
342 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default
343 3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 default
344 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default
345 20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 explicit
346 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default
347 50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL explicit
348 --- Remove a record from t1 on master ---
349 DELETE FROM t1 WHERE id = 412;
350 --- Show current count on master for t1 ---
351 SELECT COUNT(*) FROM t1;
352 COUNT(*)
353 7
354 --- Show current count on slave for t1 ---
355 SELECT COUNT(*) FROM t1;
356 COUNT(*)
357 7
358 TRUNCATE TABLE t1;
359 TRUNCATE TABLE t1;
360 --- Check that replication works when master has more columns than slave
361 --- Remove columns on slave ---
362 ALTER TABLE t1 DROP COLUMN v;
363 ALTER TABLE t1 DROP COLUMN u;
364 ALTER TABLE t1 DROP COLUMN t;
365 ALTER TABLE t1 DROP COLUMN y;
366 --- Show changed table on slave ---
367 SHOW CREATE TABLE t1;
368 Table Create Table
369 t1 CREATE TABLE `t1` (
370 `id` mediumint NOT NULL,
371 `b1` int DEFAULT NULL,
372 `vc` text,
373 `bc` char(255) DEFAULT NULL,
374 `d` decimal(10,4) DEFAULT '0.0000',
375 `f` float DEFAULT '0',
376 `total` bigint unsigned NOT NULL,
377 PRIMARY KEY (`id`,`total`)
378 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
379 STOP SLAVE;
380 Warnings:
381 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
382 RESET SLAVE;
383 Warnings:
384 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
385 RESET MASTER;
386 START SLAVE;
387 Warnings:
388 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
389 --- Populate t1 with data ---
390 --- Select from t1 on master ---
391 select *
392 from t1
393 order by id;
394 id b1 vc bc d f total y t
395 2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
396 4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
397 42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
398 142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
399 412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
400 --- Select from t1 on slave ---
401 select *
402 from t1
403 order by id;
404 id b1 vc bc d f total
405 2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0
406 4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0
407 42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0
408 142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0
409 412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0
410 --- Perform basic operation on master ---
411 --- and ensure replicated correctly ---
412 --- Update t1 on master --
413 UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22"
414 WHERE id < 100
415 ORDER BY id;
416 --- Check the update on master ---
417 SELECT *
418 FROM t1
419 WHERE id < 100
420 ORDER BY id;
421 id b1 vc bc d f total y t
422 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
423 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
424 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
425 --- Check Update on slave ---
426 SELECT *
427 FROM t1
428 WHERE id < 100
429 ORDER BY id;
430 id b1 vc bc d f total
431 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0
432 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0
433 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0
434 --- Remove a record from t1 on master ---
435 DELETE FROM t1 WHERE id = 412;
436 --- Show current count on master for t1 ---
437 SELECT COUNT(*) FROM t1;
438 COUNT(*)
439 4
440 --- Show current count on slave for t1 ---
441 SELECT COUNT(*) FROM t1;
442 COUNT(*)
443 4
444 TRUNCATE TABLE t1;
445 TRUNCATE TABLE t1;
446 --- Do Cleanup --
447 DROP TABLE t1;
448 [connection slave]
449 include/stop_slave.inc
450
451 === NDB -> INNODB ===
452
453 [connection slave]
454 alter table mysql.ndb_apply_status engine=innodb;
455 SET @@global.default_storage_engine=innodb;
456 include/start_slave.inc
457 --- Create Table Section ---
458 CREATE TABLE t1 (id MEDIUMINT NOT NULL,
459 b1 INT,
460 vc VARCHAR(255),
461 bc CHAR(255),
462 d DECIMAL(10,4) DEFAULT 0,
463 f FLOAT DEFAULT 0,
464 total BIGINT UNSIGNED,
465 y YEAR,
466 t DATE,
467 PRIMARY KEY(id));
468 --- Show table on master ---
469 SHOW CREATE TABLE t1;
470 Table Create Table
471 t1 CREATE TABLE `t1` (
472 `id` mediumint NOT NULL,
473 `b1` int DEFAULT NULL,
474 `vc` varchar(255) DEFAULT NULL,
475 `bc` char(255) DEFAULT NULL,
476 `d` decimal(10,4) DEFAULT '0.0000',
477 `f` float DEFAULT '0',
478 `total` bigint unsigned DEFAULT NULL,
479 `y` year DEFAULT NULL,
480 `t` date DEFAULT NULL,
481 PRIMARY KEY (`id`)
482 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
483 --- Show table on slave ---
484 SHOW CREATE TABLE t1;
485 Table Create Table
486 t1 CREATE TABLE `t1` (
487 `id` mediumint NOT NULL,
488 `b1` int DEFAULT NULL,
489 `vc` varchar(255) DEFAULT NULL,
490 `bc` char(255) DEFAULT NULL,
491 `d` decimal(10,4) DEFAULT '0.0000',
492 `f` float DEFAULT '0',
493 `total` bigint unsigned DEFAULT NULL,
494 `y` year DEFAULT NULL,
495 `t` date DEFAULT NULL,
496 PRIMARY KEY (`id`)
497 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
498 STOP SLAVE;
499 Warnings:
500 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
501 RESET SLAVE;
502 Warnings:
503 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
504 RESET MASTER;
505 START SLAVE;
506 Warnings:
507 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
508 --- Populate t1 with data ---
509 --- Select from t1 on master ---
510 select *
511 from t1
512 order by id;
513 id b1 vc bc d f total y t
514 2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
515 4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
516 42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
517 142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
518 412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
519 --- Select from t1 on slave ---
520 select *
521 from t1
522 order by id;
523 id b1 vc bc d f total y t
524 2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
525 4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
526 42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
527 142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
528 412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
529 --- Perform basic operation on master ---
530 --- and ensure replicated correctly ---
531 --- Update t1 on master --
532 UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22"
533 WHERE id < 100
534 ORDER BY id;
535 --- Check the update on master ---
536 SELECT *
537 FROM t1
538 WHERE id < 100
539 ORDER BY id;
540 id b1 vc bc d f total y t
541 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
542 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
543 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
544 --- Check Update on slave ---
545 SELECT *
546 FROM t1
547 WHERE id < 100
548 ORDER BY id;
549 id b1 vc bc d f total y t
550 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
551 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
552 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
553 --- Remove a record from t1 on master ---
554 DELETE FROM t1 WHERE id = 412;
555 --- Show current count on master for t1 ---
556 SELECT COUNT(*) FROM t1;
557 COUNT(*)
558 4
559 --- Show current count on slave for t1 ---
560 SELECT COUNT(*) FROM t1;
561 COUNT(*)
562 4
563 TRUNCATE TABLE t1;
564 --- Check that simple Alter statements are replicated correctly --
565 ALTER TABLE t1 DROP PRIMARY KEY;
566 ALTER TABLE t1 MODIFY vc char(32);
567 --- Show the new improved table on the master ---
568 SHOW CREATE TABLE t1;
569 Table Create Table
570 t1 CREATE TABLE `t1` (
571 `id` mediumint NOT NULL,
572 `b1` int DEFAULT NULL,
573 `vc` char(32) DEFAULT NULL,
574 `bc` char(255) DEFAULT NULL,
575 `d` decimal(10,4) DEFAULT '0.0000',
576 `f` float DEFAULT '0',
577 `total` bigint unsigned DEFAULT NULL,
578 `y` year DEFAULT NULL,
579 `t` date DEFAULT NULL
580 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
581 --- Make sure that our tables on slave are still same engine ---
582 --- and that the alter statements replicated correctly ---
583 SHOW CREATE TABLE t1;
584 Table Create Table
585 t1 CREATE TABLE `t1` (
586 `id` mediumint NOT NULL,
587 `b1` int DEFAULT NULL,
588 `vc` char(32) DEFAULT NULL,
589 `bc` char(255) DEFAULT NULL,
590 `d` decimal(10,4) DEFAULT '0.0000',
591 `f` float DEFAULT '0',
592 `total` bigint unsigned DEFAULT NULL,
593 `y` year DEFAULT NULL,
594 `t` date DEFAULT NULL
595 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
596 Warnings:
597 Warning 3135 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
598 STOP SLAVE;
599 Warnings:
600 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
601 RESET SLAVE;
602 Warnings:
603 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
604 RESET MASTER;
605 START SLAVE;
606 Warnings:
607 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
608 --- Populate t1 with data ---
609 Warnings:
610 Warning 1265 Data truncated for column 'vc' at row 1
611 Warnings:
612 Warning 1265 Data truncated for column 'vc' at row 1
613 Warnings:
614 Warning 1265 Data truncated for column 'vc' at row 1
615 Warnings:
616 Warning 1265 Data truncated for column 'vc' at row 1
617 Warnings:
618 Warning 1265 Data truncated for column 'vc' at row 1
619 --- Select from t1 on master ---
620 select *
621 from t1
622 order by id;
623 id b1 vc bc d f total y t
624 2 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
625 4 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
626 42 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
627 142 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
628 412 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
629 --- Select from t1 on slave ---
630 select *
631 from t1
632 order by id;
633 id b1 vc bc d f total y t
634 2 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
635 4 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
636 42 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
637 142 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
638 412 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
639 --- Perform basic operation on master ---
640 --- and ensure replicated correctly ---
641 --- Update t1 on master --
642 UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22"
643 WHERE id < 100
644 ORDER BY id;
645 --- Check the update on master ---
646 SELECT *
647 FROM t1
648 WHERE id < 100
649 ORDER BY id;
650 id b1 vc bc d f total y t
651 2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
652 4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
653 42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
654 --- Check Update on slave ---
655 SELECT *
656 FROM t1
657 WHERE id < 100
658 ORDER BY id;
659 id b1 vc bc d f total y t
660 2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
661 4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
662 42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
663 --- Remove a record from t1 on master ---
664 DELETE FROM t1 WHERE id = 412;
665 --- Show current count on master for t1 ---
666 SELECT COUNT(*) FROM t1;
667 COUNT(*)
668 4
669 --- Show current count on slave for t1 ---
670 SELECT COUNT(*) FROM t1;
671 COUNT(*)
672 4
673 TRUNCATE TABLE t1;
674 --- Check that replication works when slave has more columns than master
675 ALTER TABLE t1 ADD PRIMARY KEY(id,total);
676 ALTER TABLE t1 MODIFY vc TEXT;
677 INSERT INTO t1 VALUES(3,1,'Testing MySQL databases is a cool ',
678 'Must make it bug free for the customer',
679 654321.4321,15.21,0,1965,"1905-11-14");
680 INSERT INTO t1 VALUES(20,1,'Testing MySQL databases is a cool ',
681 'Must make it bug free for the customer',
682 654321.4321,15.21,0,1965,"1965-11-14");
683 INSERT INTO t1 VALUES(50,1,'Testing MySQL databases is a cool ',
684 'Must make it bug free for the customer',
685 654321.4321,15.21,0,1965,"1985-11-14");
686 --- Add columns on slave ---
687 ALTER TABLE t1 ADD (u int, v char(16) default 'default');
688 UPDATE t1 SET u=7 WHERE id < 50;
689 UPDATE t1 SET v='explicit' WHERE id >10;
690 --- Show changed table on slave ---
691 SHOW CREATE TABLE t1;
692 Table Create Table
693 t1 CREATE TABLE `t1` (
694 `id` mediumint NOT NULL,
695 `b1` int DEFAULT NULL,
696 `vc` text,
697 `bc` char(255) DEFAULT NULL,
698 `d` decimal(10,4) DEFAULT '0.0000',
699 `f` float DEFAULT '0',
700 `total` bigint unsigned NOT NULL,
701 `y` year DEFAULT NULL,
702 `t` date DEFAULT NULL,
703 `u` int DEFAULT NULL,
704 `v` char(16) DEFAULT 'default',
705 PRIMARY KEY (`id`,`total`)
706 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
707 SELECT *
708 FROM t1
709 ORDER BY id;
710 id b1 vc bc d f total y t u v
711 3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 7 default
712 20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 7 explicit
713 50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL explicit
714 STOP SLAVE;
715 Warnings:
716 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
717 RESET SLAVE;
718 Warnings:
719 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
720 RESET MASTER;
721 START SLAVE;
722 Warnings:
723 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
724 --- Populate t1 with data ---
725 --- Select from t1 on master ---
726 select *
727 from t1
728 order by id;
729 id b1 vc bc d f total y t
730 2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
731 3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
732 4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
733 20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
734 42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
735 50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
736 142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
737 412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
738 --- Select from t1 on slave ---
739 select *
740 from t1
741 order by id;
742 id b1 vc bc d f total y t u v
743 2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 NULL default
744 3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 7 default
745 4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL default
746 20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 7 explicit
747 42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 NULL default
748 50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL explicit
749 142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 NULL default
750 412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 NULL default
751 --- Perform basic operation on master ---
752 --- and ensure replicated correctly ---
753 --- Update t1 on master --
754 UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22"
755 WHERE id < 100
756 ORDER BY id;
757 --- Check the update on master ---
758 SELECT *
759 FROM t1
760 WHERE id < 100
761 ORDER BY id;
762 id b1 vc bc d f total y t
763 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
764 3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
765 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
766 20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
767 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
768 50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
769 --- Check Update on slave ---
770 SELECT *
771 FROM t1
772 WHERE id < 100
773 ORDER BY id;
774 id b1 vc bc d f total y t u v
775 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default
776 3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 default
777 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default
778 20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 explicit
779 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default
780 50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL explicit
781 --- Remove a record from t1 on master ---
782 DELETE FROM t1 WHERE id = 412;
783 --- Show current count on master for t1 ---
784 SELECT COUNT(*) FROM t1;
785 COUNT(*)
786 7
787 --- Show current count on slave for t1 ---
788 SELECT COUNT(*) FROM t1;
789 COUNT(*)
790 7
791 TRUNCATE TABLE t1;
792 TRUNCATE TABLE t1;
793 --- Check that replication works when master has more columns than slave
794 --- Remove columns on slave ---
795 ALTER TABLE t1 DROP COLUMN v;
796 ALTER TABLE t1 DROP COLUMN u;
797 ALTER TABLE t1 DROP COLUMN t;
798 ALTER TABLE t1 DROP COLUMN y;
799 --- Show changed table on slave ---
800 SHOW CREATE TABLE t1;
801 Table Create Table
802 t1 CREATE TABLE `t1` (
803 `id` mediumint NOT NULL,
804 `b1` int DEFAULT NULL,
805 `vc` text,
806 `bc` char(255) DEFAULT NULL,
807 `d` decimal(10,4) DEFAULT '0.0000',
808 `f` float DEFAULT '0',
809 `total` bigint unsigned NOT NULL,
810 PRIMARY KEY (`id`,`total`)
811 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
812 STOP SLAVE;
813 Warnings:
814 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
815 RESET SLAVE;
816 Warnings:
817 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
818 RESET MASTER;
819 START SLAVE;
820 Warnings:
821 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
822 --- Populate t1 with data ---
823 --- Select from t1 on master ---
824 select *
825 from t1
826 order by id;
827 id b1 vc bc d f total y t
828 2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
829 4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
830 42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
831 142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
832 412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
833 --- Select from t1 on slave ---
834 select *
835 from t1
836 order by id;
837 id b1 vc bc d f total
838 2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0
839 4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0
840 42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0
841 142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0
842 412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0
843 --- Perform basic operation on master ---
844 --- and ensure replicated correctly ---
845 --- Update t1 on master --
846 UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22"
847 WHERE id < 100
848 ORDER BY id;
849 --- Check the update on master ---
850 SELECT *
851 FROM t1
852 WHERE id < 100
853 ORDER BY id;
854 id b1 vc bc d f total y t
855 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
856 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
857 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
858 --- Check Update on slave ---
859 SELECT *
860 FROM t1
861 WHERE id < 100
862 ORDER BY id;
863 id b1 vc bc d f total
864 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0
865 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0
866 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0
867 --- Remove a record from t1 on master ---
868 DELETE FROM t1 WHERE id = 412;
869 --- Show current count on master for t1 ---
870 SELECT COUNT(*) FROM t1;
871 COUNT(*)
872 4
873 --- Show current count on slave for t1 ---
874 SELECT COUNT(*) FROM t1;
875 COUNT(*)
876 4
877 TRUNCATE TABLE t1;
878 TRUNCATE TABLE t1;
879 --- Do Cleanup --
880 DROP TABLE t1;
881 [connection slave]
882 include/stop_slave.inc
883 [connection slave]
884 drop table mysql.ndb_apply_status;
885 set @@global.replica_exec_mode= @old_replica_exec_mode;
886 SET @@global.default_storage_engine=@old_slave_storage_engine;
887 include/rpl_end.inc