Debian Codegraph @

mysql-test/suite/ndb_rpl/r/ndb_rpl_2ndb.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 -> NDB ===
9
10 --- Create Table Section ---
11 CREATE TABLE t1 (id MEDIUMINT NOT NULL,
12 b1 INT,
13 vc VARCHAR(255),
14 bc CHAR(255),
15 d DECIMAL(10,4) DEFAULT 0,
16 f FLOAT DEFAULT 0,
17 total BIGINT UNSIGNED,
18 y YEAR,
19 t DATE,
20 PRIMARY KEY(id));
21 --- Show table on master ---
22 SHOW CREATE TABLE t1;
23 Table Create Table
24 t1 CREATE TABLE `t1` (
25 `id` mediumint NOT NULL,
26 `b1` int DEFAULT NULL,
27 `vc` varchar(255) DEFAULT NULL,
28 `bc` char(255) DEFAULT NULL,
29 `d` decimal(10,4) DEFAULT '0.0000',
30 `f` float DEFAULT '0',
31 `total` bigint unsigned DEFAULT NULL,
32 `y` year DEFAULT NULL,
33 `t` date DEFAULT NULL,
34 PRIMARY KEY (`id`)
35 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
36 --- Show table on slave ---
37 SHOW CREATE TABLE t1;
38 Table Create Table
39 t1 CREATE TABLE `t1` (
40 `id` mediumint NOT NULL,
41 `b1` int DEFAULT NULL,
42 `vc` varchar(255) DEFAULT NULL,
43 `bc` char(255) DEFAULT NULL,
44 `d` decimal(10,4) DEFAULT '0.0000',
45 `f` float DEFAULT '0',
46 `total` bigint unsigned DEFAULT NULL,
47 `y` year DEFAULT NULL,
48 `t` date DEFAULT NULL,
49 PRIMARY KEY (`id`)
50 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
51 STOP SLAVE;
52 Warnings:
53 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
54 RESET SLAVE;
55 Warnings:
56 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
57 RESET MASTER;
58 START SLAVE;
59 Warnings:
60 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
61 --- Populate t1 with data ---
62 --- Select from t1 on master ---
63 select *
64 from t1
65 order by id;
66 id b1 vc bc d f total y t
67 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
68 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
69 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
70 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
71 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
72 --- Select from t1 on slave ---
73 select *
74 from t1
75 order by id;
76 id b1 vc bc d f total y t
77 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
78 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
79 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
80 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
81 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
82 --- Perform basic operation on master ---
83 --- and ensure replicated correctly ---
84 --- Update t1 on master --
85 UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22"
86 WHERE id < 100
87 ORDER BY id;
88 --- Check the update on master ---
89 SELECT *
90 FROM t1
91 WHERE id < 100
92 ORDER BY id;
93 id b1 vc bc d f total y t
94 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
95 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
96 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
97 --- Check Update on slave ---
98 SELECT *
99 FROM t1
100 WHERE id < 100
101 ORDER BY id;
102 id b1 vc bc d f total y t
103 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
104 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
105 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
106 --- Remove a record from t1 on master ---
107 DELETE FROM t1 WHERE id = 412;
108 --- Show current count on master for t1 ---
109 SELECT COUNT(*) FROM t1;
110 COUNT(*)
111 4
112 --- Show current count on slave for t1 ---
113 SELECT COUNT(*) FROM t1;
114 COUNT(*)
115 4
116 TRUNCATE TABLE t1;
117 --- Check that simple Alter statements are replicated correctly --
118 ALTER TABLE t1 DROP PRIMARY KEY;
119 ALTER TABLE t1 MODIFY vc char(32);
120 --- Show the new improved table on the master ---
121 SHOW CREATE TABLE t1;
122 Table Create Table
123 t1 CREATE TABLE `t1` (
124 `id` mediumint NOT NULL,
125 `b1` int DEFAULT NULL,
126 `vc` char(32) DEFAULT NULL,
127 `bc` char(255) DEFAULT NULL,
128 `d` decimal(10,4) DEFAULT '0.0000',
129 `f` float DEFAULT '0',
130 `total` bigint unsigned DEFAULT NULL,
131 `y` year DEFAULT NULL,
132 `t` date DEFAULT NULL
133 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
134 --- Make sure that our tables on slave are still same engine ---
135 --- and that the alter statements replicated correctly ---
136 SHOW CREATE TABLE t1;
137 Table Create Table
138 t1 CREATE TABLE `t1` (
139 `id` mediumint NOT NULL,
140 `b1` int DEFAULT NULL,
141 `vc` char(32) DEFAULT NULL,
142 `bc` char(255) DEFAULT NULL,
143 `d` decimal(10,4) DEFAULT '0.0000',
144 `f` float DEFAULT '0',
145 `total` bigint unsigned DEFAULT NULL,
146 `y` year DEFAULT NULL,
147 `t` date DEFAULT NULL
148 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
149 Warnings:
150 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.
151 STOP SLAVE;
152 Warnings:
153 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
154 RESET SLAVE;
155 Warnings:
156 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
157 RESET MASTER;
158 START SLAVE;
159 Warnings:
160 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
161 --- Populate t1 with data ---
162 Warnings:
163 Warning 1265 Data truncated for column 'vc' at row 1
164 Warnings:
165 Warning 1265 Data truncated for column 'vc' at row 1
166 Warnings:
167 Warning 1265 Data truncated for column 'vc' at row 1
168 Warnings:
169 Warning 1265 Data truncated for column 'vc' at row 1
170 Warnings:
171 Warning 1265 Data truncated for column 'vc' at row 1
172 --- Select from t1 on master ---
173 select *
174 from t1
175 order by id;
176 id b1 vc bc d f total y t
177 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
178 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
179 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
180 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
181 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
182 --- Select from t1 on slave ---
183 select *
184 from t1
185 order by id;
186 id b1 vc bc d f total y t
187 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
188 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
189 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
190 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
191 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
192 --- Perform basic operation on master ---
193 --- and ensure replicated correctly ---
194 --- Update t1 on master --
195 UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22"
196 WHERE id < 100
197 ORDER BY id;
198 --- Check the update on master ---
199 SELECT *
200 FROM t1
201 WHERE id < 100
202 ORDER BY id;
203 id b1 vc bc d f total y t
204 2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
205 4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
206 42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
207 --- Check Update on slave ---
208 SELECT *
209 FROM t1
210 WHERE id < 100
211 ORDER BY id;
212 id b1 vc bc d f total y t
213 2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
214 4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
215 42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22
216 --- Remove a record from t1 on master ---
217 DELETE FROM t1 WHERE id = 412;
218 --- Show current count on master for t1 ---
219 SELECT COUNT(*) FROM t1;
220 COUNT(*)
221 4
222 --- Show current count on slave for t1 ---
223 SELECT COUNT(*) FROM t1;
224 COUNT(*)
225 4
226 TRUNCATE TABLE t1;
227 --- Check that replication works when slave has more columns than master
228 ALTER TABLE t1 ADD PRIMARY KEY(id,total);
229 ALTER TABLE t1 MODIFY vc TEXT;
230 INSERT INTO t1 VALUES(3,1,'Testing MySQL databases is a cool ',
231 'Must make it bug free for the customer',
232 654321.4321,15.21,0,1965,"1905-11-14");
233 INSERT INTO t1 VALUES(20,1,'Testing MySQL databases is a cool ',
234 'Must make it bug free for the customer',
235 654321.4321,15.21,0,1965,"1965-11-14");
236 INSERT INTO t1 VALUES(50,1,'Testing MySQL databases is a cool ',
237 'Must make it bug free for the customer',
238 654321.4321,15.21,0,1965,"1985-11-14");
239 --- Add columns on slave ---
240 ALTER TABLE t1 ADD (u int, v char(16) default 'default');
241 UPDATE t1 SET u=7 WHERE id < 50;
242 UPDATE t1 SET v='explicit' WHERE id >10;
243 --- Show changed table on slave ---
244 SHOW CREATE TABLE t1;
245 Table Create Table
246 t1 CREATE TABLE `t1` (
247 `id` mediumint NOT NULL,
248 `b1` int DEFAULT NULL,
249 `vc` text,
250 `bc` char(255) DEFAULT NULL,
251 `d` decimal(10,4) DEFAULT '0.0000',
252 `f` float DEFAULT '0',
253 `total` bigint unsigned NOT NULL,
254 `y` year DEFAULT NULL,
255 `t` date DEFAULT NULL,
256 `u` int DEFAULT NULL,
257 `v` char(16) DEFAULT 'default',
258 PRIMARY KEY (`id`,`total`)
259 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
260 SELECT *
261 FROM t1
262 ORDER BY id;
263 id b1 vc bc d f total y t u v
264 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
265 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
266 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
267 STOP SLAVE;
268 Warnings:
269 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
270 RESET SLAVE;
271 Warnings:
272 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
273 RESET MASTER;
274 START SLAVE;
275 Warnings:
276 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
277 --- Populate t1 with data ---
278 --- Select from t1 on master ---
279 select *
280 from t1
281 order by id;
282 id b1 vc bc d f total y t
283 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
284 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
285 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
286 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
287 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
288 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
289 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
290 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
291 --- Select from t1 on slave ---
292 select *
293 from t1
294 order by id;
295 id b1 vc bc d f total y t u v
296 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
297 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
298 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
299 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
300 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
301 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
302 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
303 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
304 --- Perform basic operation on master ---
305 --- and ensure replicated correctly ---
306 --- Update t1 on master --
307 UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22"
308 WHERE id < 100
309 ORDER BY id;
310 --- Check the update on master ---
311 SELECT *
312 FROM t1
313 WHERE id < 100
314 ORDER BY id;
315 id b1 vc bc d f total y t
316 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
317 3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
318 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
319 20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
320 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
321 50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
322 --- Check Update on slave ---
323 SELECT *
324 FROM t1
325 WHERE id < 100
326 ORDER BY id;
327 id b1 vc bc d f total y t u v
328 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default
329 3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 default
330 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default
331 20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 explicit
332 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default
333 50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL explicit
334 --- Remove a record from t1 on master ---
335 DELETE FROM t1 WHERE id = 412;
336 --- Show current count on master for t1 ---
337 SELECT COUNT(*) FROM t1;
338 COUNT(*)
339 7
340 --- Show current count on slave for t1 ---
341 SELECT COUNT(*) FROM t1;
342 COUNT(*)
343 7
344 TRUNCATE TABLE t1;
345 TRUNCATE TABLE t1;
346 --- Check that replication works when master has more columns than slave
347 --- Remove columns on slave ---
348 ALTER TABLE t1 DROP COLUMN v;
349 ALTER TABLE t1 DROP COLUMN u;
350 ALTER TABLE t1 DROP COLUMN t;
351 ALTER TABLE t1 DROP COLUMN y;
352 --- Show changed table on slave ---
353 SHOW CREATE TABLE t1;
354 Table Create Table
355 t1 CREATE TABLE `t1` (
356 `id` mediumint NOT NULL,
357 `b1` int DEFAULT NULL,
358 `vc` text,
359 `bc` char(255) DEFAULT NULL,
360 `d` decimal(10,4) DEFAULT '0.0000',
361 `f` float DEFAULT '0',
362 `total` bigint unsigned NOT NULL,
363 PRIMARY KEY (`id`,`total`)
364 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
365 STOP SLAVE;
366 Warnings:
367 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
368 RESET SLAVE;
369 Warnings:
370 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
371 RESET MASTER;
372 START SLAVE;
373 Warnings:
374 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
375 --- Populate t1 with data ---
376 --- Select from t1 on master ---
377 select *
378 from t1
379 order by id;
380 id b1 vc bc d f total y t
381 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
382 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
383 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
384 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
385 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
386 --- Select from t1 on slave ---
387 select *
388 from t1
389 order by id;
390 id b1 vc bc d f total
391 2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0
392 4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0
393 42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0
394 142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0
395 412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0
396 --- Perform basic operation on master ---
397 --- and ensure replicated correctly ---
398 --- Update t1 on master --
399 UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22"
400 WHERE id < 100
401 ORDER BY id;
402 --- Check the update on master ---
403 SELECT *
404 FROM t1
405 WHERE id < 100
406 ORDER BY id;
407 id b1 vc bc d f total y t
408 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
409 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
410 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22
411 --- Check Update on slave ---
412 SELECT *
413 FROM t1
414 WHERE id < 100
415 ORDER BY id;
416 id b1 vc bc d f total
417 2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0
418 4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0
419 42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0
420 --- Remove a record from t1 on master ---
421 DELETE FROM t1 WHERE id = 412;
422 --- Show current count on master for t1 ---
423 SELECT COUNT(*) FROM t1;
424 COUNT(*)
425 4
426 --- Show current count on slave for t1 ---
427 SELECT COUNT(*) FROM t1;
428 COUNT(*)
429 4
430 TRUNCATE TABLE t1;
431 TRUNCATE TABLE t1;
432 --- Do Cleanup --
433 DROP TABLE t1;
434 include/rpl_end.inc