Debian Codegraph @

mysql-test/suite/ndb_rpl/r/ndb_rpl_dd_partitions.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 CREATE LOGFILE GROUP lg1
7 ADD UNDOFILE 'undofile.dat'
8 INITIAL_SIZE 16M
9 UNDO_BUFFER_SIZE = 1M
10 ENGINE=NDB;
11 ALTER LOGFILE GROUP lg1
12 ADD UNDOFILE 'undofile02.dat'
13 INITIAL_SIZE = 4M
14 ENGINE=NDB;
15 CREATE TABLESPACE ts1
16 ADD DATAFILE 'datafile.dat'
17 USE LOGFILE GROUP lg1
18 INITIAL_SIZE 12M
19 ENGINE NDB;
20 ALTER TABLESPACE ts1
21 ADD DATAFILE 'datafile02.dat'
22 INITIAL_SIZE = 4M;
23 --- Start test 2 partition RANGE testing --
24 --- Do setup --
25 CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63),
26 bc CHAR(63), d DECIMAL(10,4) DEFAULT 0,
27 f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
28 y YEAR, t DATE, primary key(t))
29 TABLESPACE ts1 STORAGE DISK
30 ENGINE=NDB
31 PARTITION BY RANGE (YEAR(t))
32 (PARTITION p0 VALUES LESS THAN (1901),
33 PARTITION p1 VALUES LESS THAN (1946),
34 PARTITION p2 VALUES LESS THAN (1966),
35 PARTITION p3 VALUES LESS THAN (1986),
36 PARTITION p4 VALUES LESS THAN (2005),
37 PARTITION p5 VALUES LESS THAN MAXVALUE);
38 --- Show table on master ---
39 SHOW CREATE TABLE t1;
40 Table Create Table
41 t1 CREATE TABLE `t1` (
42 `id` mediumint NOT NULL,
43 `b1` bit(8) DEFAULT NULL,
44 `vc` varchar(63) DEFAULT NULL,
45 `bc` char(63) DEFAULT NULL,
46 `d` decimal(10,4) DEFAULT '0.0000',
47 `f` float DEFAULT '0',
48 `total` bigint unsigned DEFAULT NULL,
49 `y` year DEFAULT NULL,
50 `t` date NOT NULL,
51 PRIMARY KEY (`t`)
52 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
53 /*!50100 PARTITION BY RANGE (year(`t`))
54 (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster,
55 PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster,
56 PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster,
57 PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster,
58 PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster,
59 PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */
60 --- Show table on slave --
61 SHOW CREATE TABLE t1;
62 Table Create Table
63 t1 CREATE TABLE `t1` (
64 `id` mediumint NOT NULL,
65 `b1` bit(8) DEFAULT NULL,
66 `vc` varchar(63) DEFAULT NULL,
67 `bc` char(63) DEFAULT NULL,
68 `d` decimal(10,4) DEFAULT '0.0000',
69 `f` float DEFAULT '0',
70 `total` bigint unsigned DEFAULT NULL,
71 `y` year DEFAULT NULL,
72 `t` date NOT NULL,
73 PRIMARY KEY (`t`)
74 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
75 /*!50100 PARTITION BY RANGE (year(`t`))
76 (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster,
77 PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster,
78 PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster,
79 PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster,
80 PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster,
81 PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */
82 --- Perform basic operation on master ---
83 --- and ensure replicated correctly ---
84 "--- Insert into t1 --" as "";
85 --- Select from t1 on master ---
86 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
87 id hex(b1) vc bc d f total y t
88 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
89 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
90 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
91 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
92 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
93 --- Select from t1 on slave ---
94 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
95 id hex(b1) vc bc d f total y t
96 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
97 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
98 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
99 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
100 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
101 --- Update t1 on master --
102 UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
103 --- Check the update on master ---
104 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
105 id hex(b1) vc bc d f total y t
106 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
107 --- Check Update on slave ---
108 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
109 id hex(b1) vc bc d f total y t
110 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
111 --- Remove a record from t1 on master ---
112 DELETE FROM t1 WHERE id = 42;
113 --- Show current count on master for t1 ---
114 SELECT COUNT(*) FROM t1;
115 COUNT(*)
116 4
117 --- Show current count on slave for t1 ---
118 SELECT COUNT(*) FROM t1;
119 COUNT(*)
120 4
121 DELETE FROM t1;
122 --- Check that simple Alter statements are replicated correctly ---
123 ALTER TABLE t1 MODIFY vc VARCHAR(255);
124 --- Show the new improved table on the master ---
125 SHOW CREATE TABLE t1;
126 Table Create Table
127 t1 CREATE TABLE `t1` (
128 `id` mediumint NOT NULL,
129 `b1` bit(8) DEFAULT NULL,
130 `vc` varchar(255) DEFAULT NULL,
131 `bc` char(63) DEFAULT NULL,
132 `d` decimal(10,4) DEFAULT '0.0000',
133 `f` float DEFAULT '0',
134 `total` bigint unsigned DEFAULT NULL,
135 `y` year DEFAULT NULL,
136 `t` date NOT NULL,
137 PRIMARY KEY (`t`)
138 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
139 /*!50100 PARTITION BY RANGE (year(`t`))
140 (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster,
141 PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster,
142 PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster,
143 PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster,
144 PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster,
145 PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */
146 --- Make sure that our tables on slave are still same engine ---
147 --- and that the alter statements replicated correctly ---
148 SHOW CREATE TABLE t1;
149 Table Create Table
150 t1 CREATE TABLE `t1` (
151 `id` mediumint NOT NULL,
152 `b1` bit(8) DEFAULT NULL,
153 `vc` varchar(255) DEFAULT NULL,
154 `bc` char(63) DEFAULT NULL,
155 `d` decimal(10,4) DEFAULT '0.0000',
156 `f` float DEFAULT '0',
157 `total` bigint unsigned DEFAULT NULL,
158 `y` year DEFAULT NULL,
159 `t` date NOT NULL,
160 PRIMARY KEY (`t`)
161 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
162 /*!50100 PARTITION BY RANGE (year(`t`))
163 (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster,
164 PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster,
165 PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster,
166 PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster,
167 PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster,
168 PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */
169 --- Perform basic operation on master ---
170 --- and ensure replicated correctly ---
171 "--- Insert into t1 --" as "";
172 --- Select from t1 on master ---
173 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
174 id hex(b1) vc bc d f total y t
175 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
176 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
177 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
178 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
179 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
180 --- Select from t1 on slave ---
181 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
182 id hex(b1) vc bc d f total y t
183 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
184 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
185 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
186 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
187 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
188 --- Update t1 on master --
189 UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
190 --- Check the update on master ---
191 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
192 id hex(b1) vc bc d f total y t
193 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
194 --- Check Update on slave ---
195 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
196 id hex(b1) vc bc d f total y t
197 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
198 --- Remove a record from t1 on master ---
199 DELETE FROM t1 WHERE id = 42;
200 --- Show current count on master for t1 ---
201 SELECT COUNT(*) FROM t1;
202 COUNT(*)
203 4
204 --- Show current count on slave for t1 ---
205 SELECT COUNT(*) FROM t1;
206 COUNT(*)
207 4
208 DELETE FROM t1;
209 --- End test 2 partition RANGE testing ---
210 --- Do Cleanup ---
211 DROP TABLE IF EXISTS t1;
212 --- Start test 3 partition LIST testing ---
213 --- Do setup ---
214 CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63),
215 bc CHAR(63), d DECIMAL(10,4) DEFAULT 0,
216 f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
217 y YEAR, t DATE, primary key(id))
218 TABLESPACE ts1 STORAGE DISK
219 ENGINE=NDB
220 PARTITION BY LIST(id)
221 (PARTITION p0 VALUES IN (2, 4),
222 PARTITION p1 VALUES IN (42, 142));
223 --- Test 3 Alter to add partition ---
224 ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412));
225 --- Show table on master ---
226 SHOW CREATE TABLE t1;
227 Table Create Table
228 t1 CREATE TABLE `t1` (
229 `id` mediumint NOT NULL,
230 `b1` bit(8) DEFAULT NULL,
231 `vc` varchar(63) DEFAULT NULL,
232 `bc` char(63) DEFAULT NULL,
233 `d` decimal(10,4) DEFAULT '0.0000',
234 `f` float DEFAULT '0',
235 `total` bigint unsigned DEFAULT NULL,
236 `y` year DEFAULT NULL,
237 `t` date DEFAULT NULL,
238 PRIMARY KEY (`id`)
239 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
240 /*!50100 PARTITION BY LIST (`id`)
241 (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster,
242 PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster,
243 PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */
244 --- Show table on slave ---
245 SHOW CREATE TABLE t1;
246 Table Create Table
247 t1 CREATE TABLE `t1` (
248 `id` mediumint NOT NULL,
249 `b1` bit(8) DEFAULT NULL,
250 `vc` varchar(63) DEFAULT NULL,
251 `bc` char(63) DEFAULT NULL,
252 `d` decimal(10,4) DEFAULT '0.0000',
253 `f` float DEFAULT '0',
254 `total` bigint unsigned DEFAULT NULL,
255 `y` year DEFAULT NULL,
256 `t` date DEFAULT NULL,
257 PRIMARY KEY (`id`)
258 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
259 /*!50100 PARTITION BY LIST (`id`)
260 (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster,
261 PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster,
262 PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */
263 --- Perform basic operation on master ---
264 --- and ensure replicated correctly ---
265 "--- Insert into t1 --" as "";
266 --- Select from t1 on master ---
267 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
268 id hex(b1) vc bc d f total y t
269 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
270 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
271 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
272 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
273 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
274 --- Select from t1 on slave ---
275 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
276 id hex(b1) vc bc d f total y t
277 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
278 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
279 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
280 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
281 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
282 --- Update t1 on master --
283 UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
284 --- Check the update on master ---
285 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
286 id hex(b1) vc bc d f total y t
287 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
288 --- Check Update on slave ---
289 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
290 id hex(b1) vc bc d f total y t
291 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
292 --- Remove a record from t1 on master ---
293 DELETE FROM t1 WHERE id = 42;
294 --- Show current count on master for t1 ---
295 SELECT COUNT(*) FROM t1;
296 COUNT(*)
297 4
298 --- Show current count on slave for t1 ---
299 SELECT COUNT(*) FROM t1;
300 COUNT(*)
301 4
302 DELETE FROM t1;
303 --- Check that simple Alter statements are replicated correctly ---
304 ALTER TABLE t1 MODIFY vc VARCHAR(255);
305 --- Show the new improved table on the master ---
306 SHOW CREATE TABLE t1;
307 Table Create Table
308 t1 CREATE TABLE `t1` (
309 `id` mediumint NOT NULL,
310 `b1` bit(8) DEFAULT NULL,
311 `vc` varchar(255) DEFAULT NULL,
312 `bc` char(63) DEFAULT NULL,
313 `d` decimal(10,4) DEFAULT '0.0000',
314 `f` float DEFAULT '0',
315 `total` bigint unsigned DEFAULT NULL,
316 `y` year DEFAULT NULL,
317 `t` date DEFAULT NULL,
318 PRIMARY KEY (`id`)
319 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
320 /*!50100 PARTITION BY LIST (`id`)
321 (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster,
322 PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster,
323 PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */
324 --- Make sure that our tables on slave are still same engine ---
325 --- and that the alter statements replicated correctly ---
326 SHOW CREATE TABLE t1;
327 Table Create Table
328 t1 CREATE TABLE `t1` (
329 `id` mediumint NOT NULL,
330 `b1` bit(8) DEFAULT NULL,
331 `vc` varchar(255) DEFAULT NULL,
332 `bc` char(63) DEFAULT NULL,
333 `d` decimal(10,4) DEFAULT '0.0000',
334 `f` float DEFAULT '0',
335 `total` bigint unsigned DEFAULT NULL,
336 `y` year DEFAULT NULL,
337 `t` date DEFAULT NULL,
338 PRIMARY KEY (`id`)
339 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
340 /*!50100 PARTITION BY LIST (`id`)
341 (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster,
342 PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster,
343 PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */
344 --- Perform basic operation on master ---
345 --- and ensure replicated correctly ---
346 "--- Insert into t1 --" as "";
347 --- Select from t1 on master ---
348 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
349 id hex(b1) vc bc d f total y t
350 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
351 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
352 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
353 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
354 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
355 --- Select from t1 on slave ---
356 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
357 id hex(b1) vc bc d f total y t
358 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
359 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
360 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
361 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
362 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
363 --- Update t1 on master --
364 UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
365 --- Check the update on master ---
366 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
367 id hex(b1) vc bc d f total y t
368 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
369 --- Check Update on slave ---
370 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
371 id hex(b1) vc bc d f total y t
372 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
373 --- Remove a record from t1 on master ---
374 DELETE FROM t1 WHERE id = 42;
375 --- Show current count on master for t1 ---
376 SELECT COUNT(*) FROM t1;
377 COUNT(*)
378 4
379 --- Show current count on slave for t1 ---
380 SELECT COUNT(*) FROM t1;
381 COUNT(*)
382 4
383 DELETE FROM t1;
384 --- End test 3 partition LIST testing ---
385 --- Do Cleanup --
386 DROP TABLE IF EXISTS t1;
387 --- Start test 4 partition HASH testing ---
388 --- Do setup ---
389 CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63),
390 bc CHAR(63), d DECIMAL(10,4) DEFAULT 0,
391 f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
392 y YEAR, t DATE, primary key(t))
393 TABLESPACE ts1 STORAGE DISK
394 ENGINE=NDB
395 PARTITION BY HASH( YEAR(t) )
396 PARTITIONS 4;
397 --- show that tables have been created correctly ---
398 SHOW CREATE TABLE t1;
399 Table Create Table
400 t1 CREATE TABLE `t1` (
401 `id` mediumint NOT NULL,
402 `b1` bit(8) DEFAULT NULL,
403 `vc` varchar(63) DEFAULT NULL,
404 `bc` char(63) DEFAULT NULL,
405 `d` decimal(10,4) DEFAULT '0.0000',
406 `f` float DEFAULT '0',
407 `total` bigint unsigned DEFAULT NULL,
408 `y` year DEFAULT NULL,
409 `t` date NOT NULL,
410 PRIMARY KEY (`t`)
411 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
412 /*!50100 PARTITION BY HASH (year(`t`))
413 PARTITIONS 4 */
414 SHOW CREATE TABLE t1;
415 Table Create Table
416 t1 CREATE TABLE `t1` (
417 `id` mediumint NOT NULL,
418 `b1` bit(8) DEFAULT NULL,
419 `vc` varchar(63) DEFAULT NULL,
420 `bc` char(63) DEFAULT NULL,
421 `d` decimal(10,4) DEFAULT '0.0000',
422 `f` float DEFAULT '0',
423 `total` bigint unsigned DEFAULT NULL,
424 `y` year DEFAULT NULL,
425 `t` date NOT NULL,
426 PRIMARY KEY (`t`)
427 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
428 /*!50100 PARTITION BY HASH (year(`t`))
429 PARTITIONS 4 */
430 --- Perform basic operation on master ---
431 --- and ensure replicated correctly ---
432 "--- Insert into t1 --" as "";
433 --- Select from t1 on master ---
434 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
435 id hex(b1) vc bc d f total y t
436 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
437 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
438 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
439 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
440 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
441 --- Select from t1 on slave ---
442 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
443 id hex(b1) vc bc d f total y t
444 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
445 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
446 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
447 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
448 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
449 --- Update t1 on master --
450 UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
451 --- Check the update on master ---
452 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
453 id hex(b1) vc bc d f total y t
454 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
455 --- Check Update on slave ---
456 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
457 id hex(b1) vc bc d f total y t
458 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
459 --- Remove a record from t1 on master ---
460 DELETE FROM t1 WHERE id = 42;
461 --- Show current count on master for t1 ---
462 SELECT COUNT(*) FROM t1;
463 COUNT(*)
464 4
465 --- Show current count on slave for t1 ---
466 SELECT COUNT(*) FROM t1;
467 COUNT(*)
468 4
469 DELETE FROM t1;
470 --- Check that simple Alter statements are replicated correctly ---
471 ALTER TABLE t1 MODIFY vc VARCHAR(255);
472 --- Show the new improved table on the master ---
473 SHOW CREATE TABLE t1;
474 Table Create Table
475 t1 CREATE TABLE `t1` (
476 `id` mediumint NOT NULL,
477 `b1` bit(8) DEFAULT NULL,
478 `vc` varchar(255) DEFAULT NULL,
479 `bc` char(63) DEFAULT NULL,
480 `d` decimal(10,4) DEFAULT '0.0000',
481 `f` float DEFAULT '0',
482 `total` bigint unsigned DEFAULT NULL,
483 `y` year DEFAULT NULL,
484 `t` date NOT NULL,
485 PRIMARY KEY (`t`)
486 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
487 /*!50100 PARTITION BY HASH (year(`t`))
488 PARTITIONS 4 */
489 --- Make sure that our tables on slave are still same engine ---
490 --- and that the alter statements replicated correctly ---
491 SHOW CREATE TABLE t1;
492 Table Create Table
493 t1 CREATE TABLE `t1` (
494 `id` mediumint NOT NULL,
495 `b1` bit(8) DEFAULT NULL,
496 `vc` varchar(255) DEFAULT NULL,
497 `bc` char(63) DEFAULT NULL,
498 `d` decimal(10,4) DEFAULT '0.0000',
499 `f` float DEFAULT '0',
500 `total` bigint unsigned DEFAULT NULL,
501 `y` year DEFAULT NULL,
502 `t` date NOT NULL,
503 PRIMARY KEY (`t`)
504 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
505 /*!50100 PARTITION BY HASH (year(`t`))
506 PARTITIONS 4 */
507 --- Perform basic operation on master ---
508 --- and ensure replicated correctly ---
509 "--- Insert into t1 --" as "";
510 --- Select from t1 on master ---
511 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
512 id hex(b1) vc bc d f total y t
513 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
514 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
515 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
516 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
517 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
518 --- Select from t1 on slave ---
519 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
520 id hex(b1) vc bc d f total y t
521 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
522 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
523 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
524 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
525 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
526 --- Update t1 on master --
527 UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
528 --- Check the update on master ---
529 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
530 id hex(b1) vc bc d f total y t
531 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
532 --- Check Update on slave ---
533 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
534 id hex(b1) vc bc d f total y t
535 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
536 --- Remove a record from t1 on master ---
537 DELETE FROM t1 WHERE id = 42;
538 --- Show current count on master for t1 ---
539 SELECT COUNT(*) FROM t1;
540 COUNT(*)
541 4
542 --- Show current count on slave for t1 ---
543 SELECT COUNT(*) FROM t1;
544 COUNT(*)
545 4
546 DELETE FROM t1;
547 --- End test 4 partition HASH testing ---
548 --- Do Cleanup --
549 DROP TABLE IF EXISTS t1;
550 --- Start test 5 partition by key testing ---
551 --- Create Table Section ---
552 CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63),
553 bc CHAR(63), d DECIMAL(10,4) DEFAULT 0,
554 f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
555 y YEAR, t DATE,PRIMARY KEY(id))
556 TABLESPACE ts1 STORAGE DISK
557 ENGINE=NDB
558 PARTITION BY KEY()
559 PARTITIONS 4;
560 --- Show that tables on master are ndbcluster tables ---
561 SHOW CREATE TABLE t1;
562 Table Create Table
563 t1 CREATE TABLE `t1` (
564 `id` mediumint NOT NULL,
565 `b1` bit(8) DEFAULT NULL,
566 `vc` varchar(63) DEFAULT NULL,
567 `bc` char(63) DEFAULT NULL,
568 `d` decimal(10,4) DEFAULT '0.0000',
569 `f` float DEFAULT '0',
570 `total` bigint unsigned DEFAULT NULL,
571 `y` year DEFAULT NULL,
572 `t` date DEFAULT NULL,
573 PRIMARY KEY (`id`)
574 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
575 /*!50100 PARTITION BY KEY ()
576 PARTITIONS 4 */
577 --- Show that tables on slave ---
578 SHOW CREATE TABLE t1;
579 Table Create Table
580 t1 CREATE TABLE `t1` (
581 `id` mediumint NOT NULL,
582 `b1` bit(8) DEFAULT NULL,
583 `vc` varchar(63) DEFAULT NULL,
584 `bc` char(63) DEFAULT NULL,
585 `d` decimal(10,4) DEFAULT '0.0000',
586 `f` float DEFAULT '0',
587 `total` bigint unsigned DEFAULT NULL,
588 `y` year DEFAULT NULL,
589 `t` date DEFAULT NULL,
590 PRIMARY KEY (`id`)
591 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
592 /*!50100 PARTITION BY KEY ()
593 PARTITIONS 4 */
594 --- Perform basic operation on master ---
595 --- and ensure replicated correctly ---
596 "--- Insert into t1 --" as "";
597 --- Select from t1 on master ---
598 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
599 id hex(b1) vc bc d f total y t
600 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
601 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
602 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
603 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
604 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
605 --- Select from t1 on slave ---
606 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
607 id hex(b1) vc bc d f total y t
608 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
609 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
610 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
611 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
612 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
613 --- Update t1 on master --
614 UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
615 --- Check the update on master ---
616 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
617 id hex(b1) vc bc d f total y t
618 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
619 --- Check Update on slave ---
620 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
621 id hex(b1) vc bc d f total y t
622 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
623 --- Remove a record from t1 on master ---
624 DELETE FROM t1 WHERE id = 42;
625 --- Show current count on master for t1 ---
626 SELECT COUNT(*) FROM t1;
627 COUNT(*)
628 4
629 --- Show current count on slave for t1 ---
630 SELECT COUNT(*) FROM t1;
631 COUNT(*)
632 4
633 DELETE FROM t1;
634 --- Check that simple Alter statements are replicated correctly ---
635 ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total);
636 --- Show the new improved table on the master ---
637 SHOW CREATE TABLE t1;
638 Table Create Table
639 t1 CREATE TABLE `t1` (
640 `id` mediumint NOT NULL,
641 `b1` bit(8) DEFAULT NULL,
642 `vc` varchar(63) DEFAULT NULL,
643 `bc` char(63) DEFAULT NULL,
644 `d` decimal(10,4) DEFAULT '0.0000',
645 `f` float DEFAULT '0',
646 `total` bigint unsigned NOT NULL,
647 `y` year DEFAULT NULL,
648 `t` date DEFAULT NULL,
649 PRIMARY KEY (`id`,`total`)
650 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
651 /*!50100 PARTITION BY KEY ()
652 PARTITIONS 4 */
653 --- Make sure that our tables on slave are still right type ---
654 --- and that the alter statements replicated correctly ---
655 SHOW CREATE TABLE t1;
656 Table Create Table
657 t1 CREATE TABLE `t1` (
658 `id` mediumint NOT NULL,
659 `b1` bit(8) DEFAULT NULL,
660 `vc` varchar(63) DEFAULT NULL,
661 `bc` char(63) DEFAULT NULL,
662 `d` decimal(10,4) DEFAULT '0.0000',
663 `f` float DEFAULT '0',
664 `total` bigint unsigned NOT NULL,
665 `y` year DEFAULT NULL,
666 `t` date DEFAULT NULL,
667 PRIMARY KEY (`id`,`total`)
668 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
669 /*!50100 PARTITION BY KEY ()
670 PARTITIONS 4 */
671 --- Perform basic operation on master ---
672 --- and ensure replicated correctly ---
673 "--- Insert into t1 --" as "";
674 --- Select from t1 on master ---
675 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
676 id hex(b1) vc bc d f total y t
677 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
678 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
679 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
680 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
681 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
682 --- Select from t1 on slave ---
683 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
684 id hex(b1) vc bc d f total y t
685 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
686 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
687 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
688 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
689 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
690 --- Update t1 on master --
691 UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
692 --- Check the update on master ---
693 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
694 id hex(b1) vc bc d f total y t
695 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
696 --- Check Update on slave ---
697 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
698 id hex(b1) vc bc d f total y t
699 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
700 --- Remove a record from t1 on master ---
701 DELETE FROM t1 WHERE id = 42;
702 --- Show current count on master for t1 ---
703 SELECT COUNT(*) FROM t1;
704 COUNT(*)
705 4
706 --- Show current count on slave for t1 ---
707 SELECT COUNT(*) FROM t1;
708 COUNT(*)
709 4
710 DELETE FROM t1;
711 --- Check that simple Alter statements are replicated correctly ---
712 ALTER TABLE t1 MODIFY vc VARCHAR(255);
713 --- Show the new improved table on the master ---
714 SHOW CREATE TABLE t1;
715 Table Create Table
716 t1 CREATE TABLE `t1` (
717 `id` mediumint NOT NULL,
718 `b1` bit(8) DEFAULT NULL,
719 `vc` varchar(255) DEFAULT NULL,
720 `bc` char(63) DEFAULT NULL,
721 `d` decimal(10,4) DEFAULT '0.0000',
722 `f` float DEFAULT '0',
723 `total` bigint unsigned NOT NULL,
724 `y` year DEFAULT NULL,
725 `t` date DEFAULT NULL,
726 PRIMARY KEY (`id`,`total`)
727 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
728 /*!50100 PARTITION BY KEY ()
729 PARTITIONS 4 */
730 --- Make sure that our tables on slave are still same engine ---
731 --- and that the alter statements replicated correctly ---
732 SHOW CREATE TABLE t1;
733 Table Create Table
734 t1 CREATE TABLE `t1` (
735 `id` mediumint NOT NULL,
736 `b1` bit(8) DEFAULT NULL,
737 `vc` varchar(255) DEFAULT NULL,
738 `bc` char(63) DEFAULT NULL,
739 `d` decimal(10,4) DEFAULT '0.0000',
740 `f` float DEFAULT '0',
741 `total` bigint unsigned NOT NULL,
742 `y` year DEFAULT NULL,
743 `t` date DEFAULT NULL,
744 PRIMARY KEY (`id`,`total`)
745 ) /*!50100 TABLESPACE `ts1` STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
746 /*!50100 PARTITION BY KEY ()
747 PARTITIONS 4 */
748 --- Perform basic operation on master ---
749 --- and ensure replicated correctly ---
750 "--- Insert into t1 --" as "";
751 --- Select from t1 on master ---
752 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
753 id hex(b1) vc bc d f total y t
754 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
755 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
756 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
757 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
758 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
759 --- Select from t1 on slave ---
760 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
761 id hex(b1) vc bc d f total y t
762 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
763 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
764 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
765 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
766 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
767 --- Update t1 on master --
768 UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
769 --- Check the update on master ---
770 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
771 id hex(b1) vc bc d f total y t
772 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
773 --- Check Update on slave ---
774 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
775 id hex(b1) vc bc d f total y t
776 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
777 --- Remove a record from t1 on master ---
778 DELETE FROM t1 WHERE id = 42;
779 --- Show current count on master for t1 ---
780 SELECT COUNT(*) FROM t1;
781 COUNT(*)
782 4
783 --- Show current count on slave for t1 ---
784 SELECT COUNT(*) FROM t1;
785 COUNT(*)
786 4
787 DELETE FROM t1;
788 --- End test 5 key partition testing ---
789 --- Do Cleanup ---
790 DROP TABLE IF EXISTS t1;
791 alter tablespace ts1
792 drop datafile 'datafile.dat';
793 alter tablespace ts1
794 drop datafile 'datafile02.dat';
795 DROP TABLESPACE ts1;
796 DROP LOGFILE GROUP lg1 ENGINE=NDB;
797 include/rpl_end.inc