Debian Codegraph @

mysql-test/suite/federated/federatedx.test

raw
1 # Note: This test is tricky. It reuses the prerequisites generated for
2 # replication tests (master+slave server and connections) for its
3 # own purposes. But the replication feature itself is stopped.
4 #
5
6
7 --source have_federatedx.inc
8 --source include/federated.inc
9
10 connection default;
11
12 # Disable concurrent inserts to avoid test failures when reading
13 # data from concurrent connections (insert might return before
14 # the data is actually in the table).
15 SET @OLD_MASTER_CONCURRENT_INSERT= @@GLOBAL.CONCURRENT_INSERT;
16 SET @@GLOBAL.CONCURRENT_INSERT= 0;
17
18 connection slave;
19 SET @OLD_SLAVE_CONCURRENT_INSERT= @@GLOBAL.CONCURRENT_INSERT;
20 SET @@GLOBAL.CONCURRENT_INSERT= 0;
21 DROP TABLE IF EXISTS federated.t1;
22 CREATE TABLE federated.t1 (
23 `id` int(20) NOT NULL,
24 `group` int NOT NULL default 0,
25 `a\\b` int NOT NULL default 0,
26 `a\\` int NOT NULL default 0,
27 `name` varchar(32) NOT NULL default ''
28 )
29 DEFAULT CHARSET=latin1;
30
31 connection master;
32 DROP TABLE IF EXISTS federated.t1;
33 # test too many items (malformed) in the comment string url
34 --error ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE
35 CREATE TABLE federated.t1 (
36 `id` int(20) NOT NULL,
37 `group` int NOT NULL default 0,
38 `a\\b` inT NOT NULL default 0,
39 `a\\` int NOT NULL default 0,
40 `name` varchar(32) NOT NULL default ''
41 )
42 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
43 CONNECTION='mysql://[email protected]:@/too/many/items/federated/t1';
44
45 # test not enough items (malformed) in the comment string url
46 --error ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE
47 CREATE TABLE federated.t1 (
48 `id` int(20) NOT NULL,
49 `group` int NOT NULL default 0,
50 `a\\b` iNt NOT NULL default 0,
51 `a\\` int NOT NULL default 0,
52 `name` varchar(32) NOT NULL default ''
53 )
54 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
55 CONNECTION='mysql://[email protected]';
56
57 # test non-existant table
58 --replace_result $SLAVE_MYPORT SLAVE_PORT
59 --error ER_CANT_CREATE_FEDERATED_TABLE
60 eval CREATE TABLE federated.t1 (
61 `id` int(20) NOT NULL,
62 `group` int NOT NULL default 0,
63 `a\\\\b` iNT NOT NULL default 0,
64 `a\\\\` int NOT NULL default 0,
65 `name` varchar(32) NOT NULL default ''
66 )
67 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
68 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t3';
69 DROP TABLE IF EXISTS federated.t1;
70
71 # test bad user/password
72 --replace_result $SLAVE_MYPORT SLAVE_PORT
73 --error ER_CANT_CREATE_FEDERATED_TABLE
74 eval CREATE TABLE federated.t1 (
75 `id` int(20) NOT NULL,
76 `group` int NOT NULL default 0,
77 `a\\\\b` Int NOT NULL default 0,
78 `a\\\\` int NOT NULL default 0,
79 `name` varchar(32) NOT NULL default ''
80 )
81 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
82 CONNECTION='mysql://user:[email protected]:$SLAVE_MYPORT/federated/t1';
83 DROP TABLE IF EXISTS federated.t1;
84
85 # # correct connection, same named tables
86 --replace_result $SLAVE_MYPORT SLAVE_PORT
87 eval CREATE TABLE federated.t1 (
88 `id` int(20) NOT NULL,
89 `group` int NOT NULL default 0,
90 `a\\\\b` InT NOT NULL default 0,
91 `a\\\\` int NOT NULL default 0,
92 `name` varchar(32) NOT NULL default ''
93 )
94 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
95 CONNECTION='mariadb://[email protected]:$SLAVE_MYPORT/federated/t1';
96
97 INSERT INTO federated.t1 (id, name) VALUES (1, 'foo');
98 INSERT INTO federated.t1 (id, name) VALUES (2, 'fee');
99 INSERT INTO federated.t1 (id, `group`) VALUES (3, 42);
100 INSERT INTO federated.t1 (id, `a\\b`) VALUES (4, 23);
101 INSERT INTO federated.t1 (id, `a\\`) VALUES (5, 1);
102
103 --sorted_result
104 SELECT * FROM federated.t1;
105 DELETE FROM federated.t1;
106 DROP TABLE federated.t1;
107
108 # correct connection, differently named tables
109 DROP TABLE IF EXISTS federated.t2;
110 --replace_result $SLAVE_MYPORT SLAVE_PORT
111 eval CREATE TABLE federated.t2 (
112 `id` int(20) NOT NULL,
113 `name` varchar(32) NOT NULL default ''
114 )
115 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
116 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
117
118 --replace_result $SLAVE_MYPORT SLAVE_PORT
119 eval SHOW CREATE TABLE federated.t2;
120
121 INSERT INTO federated.t2 (id, name) VALUES (1, 'foo');
122 INSERT INTO federated.t2 (id, name) VALUES (2, 'fee');
123
124 SELECT * FROM federated.t2 ORDER BY id, name;
125 DROP TABLE federated.t2;
126
127 connection slave;
128 DROP TABLE IF EXISTS federated.t1;
129
130 DROP TABLE IF EXISTS federated.`t1%`;
131 CREATE TABLE federated.`t1%` (
132 `id` int(20) NOT NULL,
133 `name` varchar(32) NOT NULL default ''
134 )
135 DEFAULT CHARSET=latin1;
136
137 connection master;
138 DROP TABLE IF EXISTS federated.t1;
139
140 --replace_result $SLAVE_MYPORT SLAVE_PORT
141 eval CREATE TABLE federated.t1 (
142 `id` int(20) NOT NULL,
143 `name` varchar(32) NOT NULL default ''
144 )
145 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
146 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1%';
147
148 INSERT INTO federated.t1 (id, name) VALUES (1, 'foo');
149 INSERT INTO federated.t1 (id, name) VALUES (2, 'fee');
150
151 SELECT * FROM federated.t1 ORDER BY id,name;
152 DELETE FROM federated.t1;
153 DROP TABLE IF EXISTS federated.t1;
154
155 --replace_result $SLAVE_MYPORT SLAVE_PORT
156 eval CREATE TABLE federated.`t1%` (
157 `id` int(20) NOT NULL,
158 `name` varchar(32) NOT NULL default ''
159 )
160 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
161 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1%';
162
163 INSERT INTO federated.`t1%` (id, name) VALUES (1, 'foo');
164 INSERT INTO federated.`t1%` (id, name) VALUES (2, 'fee');
165
166 SELECT * FROM federated.`t1%` ORDER BY id, name;
167 DELETE FROM federated.`t1%`;
168 DROP TABLE IF EXISTS federated.`t1%`;
169
170 connection slave;
171 DROP TABLE IF EXISTS federated.`t1%`;
172
173 # I wanted to use timestamp, but results will fail if so!!!
174 DROP TABLE IF EXISTS federated.t1;
175 CREATE TABLE federated.t1 (
176 `id` int(20) NOT NULL auto_increment,
177 `name` varchar(32) NOT NULL default '',
178 `other` int(20) NOT NULL default '0',
179 `created` datetime default '2004-04-04 04:04:04',
180 PRIMARY KEY (`id`))
181 DEFAULT CHARSET=latin1;
182
183 connection master;
184 --replace_result $SLAVE_MYPORT SLAVE_PORT
185 eval CREATE TABLE federated.t1 (
186 `id` int(20) NOT NULL auto_increment,
187 `name` varchar(32) NOT NULL default '',
188 `other` int(20) NOT NULL default '0',
189 `created` datetime default '2004-04-04 04:04:04',
190 PRIMARY KEY (`id`))
191 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
192 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
193
194 INSERT INTO federated.t1 (name, other) VALUES ('First Name', 11111);
195 INSERT INTO federated.t1 (name, other) VALUES ('Second Name', 22222);
196 INSERT INTO federated.t1 (name, other) VALUES ('Third Name', 33333);
197 INSERT INTO federated.t1 (name, other) VALUES ('Fourth Name', 44444);
198 INSERT INTO federated.t1 (name, other) VALUES ('Fifth Name', 55555);
199 INSERT INTO federated.t1 (name, other) VALUES ('Sixth Name', 66666);
200 INSERT INTO federated.t1 (name, other) VALUES ('Seventh Name', 77777);
201 INSERT INTO federated.t1 (name, other) VALUES ('Eigth Name', 88888);
202 INSERT INTO federated.t1 (name, other) VALUES ('Ninth Name', 99999);
203 INSERT INTO federated.t1 (name, other) VALUES ('Tenth Name', 101010);
204
205 # basic select
206 --sorted_result
207 SELECT * FROM federated.t1;
208 # with PRIMARY KEY index_read_idx
209 SELECT * FROM federated.t1 WHERE id = 5;
210 SELECT * FROM federated.t1 WHERE name = 'Sixth Name';
211 SELECT * FROM federated.t1 WHERE id = 6 and name = 'Sixth Name';
212 SELECT * FROM federated.t1 WHERE name = 'Sixth Name' AND other = 44444;
213 --sorted_result
214 SELECT * FROM federated.t1 WHERE name like '%th%';
215 UPDATE federated.t1 SET name = '3rd name' WHERE id = 3;
216 SELECT * FROM federated.t1 WHERE name = '3rd name';
217 UPDATE federated.t1 SET name = 'Third name' WHERE name = '3rd name';
218 SELECT * FROM federated.t1 WHERE name = 'Third name';
219 # rnd_post, ::position
220 SELECT * FROM federated.t1 ORDER BY id DESC;
221 SELECT * FROM federated.t1 ORDER BY name;
222 SELECT * FROM federated.t1 ORDER BY name DESC;
223 SELECT * FROM federated.t1 ORDER BY name ASC;
224 SELECT * FROM federated.t1 GROUP BY other;
225
226 # ::delete_row
227 DELETE FROM federated.t1 WHERE id = 5;
228 SELECT * FROM federated.t1 WHERE id = 5;
229
230 # ::delete_all_rows
231 DELETE FROM federated.t1;
232 SELECT * FROM federated.t1 WHERE id = 5;
233
234 # previous test, but this time with indexes
235 connection slave;
236 DROP TABLE IF EXISTS federated.t1;
237 CREATE TABLE federated.t1 (
238 `id` int(20) NOT NULL auto_increment,
239 `name` varchar(32) NOT NULL default '',
240 `other` int(20) NOT NULL default '0',
241 `created` datetime NOT NULL,
242 PRIMARY KEY (`id`),
243 key name(`name`),
244 key other(`other`),
245 key created(`created`))
246 DEFAULT CHARSET=latin1;
247
248 connection master;
249 DROP TABLE IF EXISTS federated.t1;
250 --replace_result $SLAVE_MYPORT SLAVE_PORT
251 eval CREATE TABLE federated.t1 (
252 `id` int(20) NOT NULL auto_increment,
253 `name` varchar(32) NOT NULL default '',
254 `other` int(20) NOT NULL default '0',
255 `created` datetime NOT NULL,
256 PRIMARY KEY (`id`),
257 key name(`name`),
258 key other(`other`),
259 key created(`created`))
260 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
261 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
262
263 INSERT INTO federated.t1 (name, other, created)
264 VALUES ('First Name', 11111, '2004-01-01 01:01:01');
265 INSERT INTO federated.t1 (name, other, created)
266 VALUES ('Second Name', 22222, '2004-01-23 02:43:00');
267 INSERT INTO federated.t1 (name, other, created)
268 VALUES ('Third Name', 33333, '2004-02-14 02:14:00');
269 INSERT INTO federated.t1 (name, other, created)
270 VALUES ('Fourth Name', 44444, '2003-04-05 00:00:00');
271 INSERT INTO federated.t1 (name, other, created)
272 VALUES ('Fifth Name', 55555, '2001-02-02 02:02:02');
273 INSERT INTO federated.t1 (name, other, created)
274 VALUES ('Sixth Name', 66666, '2005-06-06 15:30:00');
275 INSERT INTO federated.t1 (name, other, created)
276 VALUES ('Seventh Name', 77777, '2003-12-12 18:32:00');
277 INSERT INTO federated.t1 (name, other, created)
278 VALUES ('Eigth Name', 88888, '2005-03-12 11:00:00');
279 INSERT INTO federated.t1 (name, other, created)
280 VALUES ('Ninth Name', 99999, '2005-03-12 11:00:01');
281 INSERT INTO federated.t1 (name, other, created)
282 VALUES ('Tenth Name', 101010, '2005-03-12 12:00:01');
283
284 # basic select
285 --sorted_result
286 SELECT * FROM federated.t1;
287 # with PRIMARY KEY index_read_idx
288 SELECT * FROM federated.t1 WHERE id = 5;
289 # with regular key index_read -> index_read_idx
290 # regular and PRIMARY KEY index_read_idx
291 SELECT * FROM federated.t1 WHERE id = 6 and name = 'Sixth Name';
292 # with regular key index_read -> index_read_idx
293 SELECT * FROM federated.t1 WHERE other = 44444;
294 --sorted_result
295 SELECT * FROM federated.t1 WHERE name like '%th%';
296 # update - update_row, index_read_idx
297 UPDATE federated.t1 SET name = '3rd name' WHERE id = 3;
298 SELECT * FROM federated.t1 WHERE name = '3rd name';
299 # update - update_row, index_read -> index_read_idx
300 UPDATE federated.t1 SET name = 'Third name' WHERE name = '3rd name';
301 SELECT * FROM federated.t1 WHERE name = 'Third name';
302 # rnd_post, ::position
303 SELECT * FROM federated.t1 ORDER BY id DESC;
304 SELECT * FROM federated.t1 ORDER BY name;
305 SELECT * FROM federated.t1 ORDER BY name DESC;
306 SELECT * FROM federated.t1 ORDER BY name ASC;
307 SELECT * FROM federated.t1 GROUP BY other;
308
309 # ::delete_row
310 DELETE FROM federated.t1 WHERE id = 5;
311 SELECT * FROM federated.t1 WHERE id = 5;
312
313 # ::delete_all_rows
314 DELETE FROM federated.t1;
315 SELECT * FROM federated.t1 WHERE id = 5;
316 connection slave;
317 DROP TABLE IF EXISTS federated.t1;
318 CREATE TABLE federated.t1 (
319 `id` int(20) NOT NULL auto_increment,
320 `name` varchar(32),
321 `other` varchar(20),
322 PRIMARY KEY (`id`) );
323
324 connection master;
325 DROP TABLE IF EXISTS federated.t1;
326 --replace_result $SLAVE_MYPORT SLAVE_PORT
327 eval CREATE TABLE federated.t1 (
328 `id` int(20) NOT NULL auto_increment,
329 `name` varchar(32),
330 `other` varchar(20),
331 PRIMARY KEY (`id`) )
332 ENGINE="FEDERATED"
333 DEFAULT CHARSET=latin1
334 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
335
336 INSERT INTO federated.t1 (name, other) VALUES ('First Name', 11111);
337 INSERT INTO federated.t1 (name, other) VALUES ('Second Name', NULL);
338 INSERT INTO federated.t1 (name, other) VALUES ('Third Name', 33333);
339 INSERT INTO federated.t1 (name, other) VALUES (NULL, NULL);
340 INSERT INTO federated.t1 (name, other) VALUES ('Fifth Name', 55555);
341 INSERT INTO federated.t1 (name, other) VALUES ('Sixth Name', 66666);
342 INSERT INTO federated.t1 (name) VALUES ('Seventh Name');
343 INSERT INTO federated.t1 (name, other) VALUES ('Eigth Name', 88888);
344 INSERT INTO federated.t1 (name, other) VALUES ('Ninth Name', 99999);
345 INSERT INTO federated.t1 (other) VALUES ('fee fie foe fum');
346
347 --sorted_result
348 SELECT * FROM federated.t1 WHERE other IS NULL;
349 --sorted_result
350 SELECT * FROM federated.t1 WHERE name IS NULL;
351 SELECT * FROM federated.t1 WHERE name IS NULL and other IS NULL;
352 --sorted_result
353 SELECT * FROM federated.t1 WHERE name IS NULL or other IS NULL;
354
355 UPDATE federated.t1
356 SET name = 'Fourth Name', other = 'four four four'
357 WHERE name IS NULL AND other IS NULL;
358
359 UPDATE federated.t1 SET other = 'two two two two' WHERE name = 'Second Name';
360 UPDATE federated.t1 SET other = 'seven seven' WHERE name like 'Sev%';
361 UPDATE federated.t1 SET name = 'Tenth Name' WHERE other like 'fee fie%';
362 SELECT * FROM federated.t1 WHERE name IS NULL OR other IS NULL ;
363 --sorted_result
364 SELECT * FROM federated.t1;
365
366 # test multi-keys
367 connection slave;
368 DROP TABLE IF EXISTS federated.t1;
369 CREATE TABLE federated.t1 (
370 `id` int(20) NOT NULL auto_increment,
371 `name` varchar(32) NOT NULL DEFAULT '',
372 `other` varchar(20) NOT NULL DEFAULT '',
373 PRIMARY KEY (`id`),
374 KEY nameoth (name, other) );
375
376 connection master;
377 DROP TABLE IF EXISTS federated.t1;
378 --replace_result $SLAVE_MYPORT SLAVE_PORT
379 eval CREATE TABLE federated.t1 (
380 `id` int(20) NOT NULL auto_increment,
381 `name` varchar(32) NOT NULL DEFAULT '',
382 `other` varchar(20) NOT NULL DEFAULT '',
383 PRIMARY KEY (`id`),
384 KEY nameoth (name, other))
385 ENGINE="FEDERATED" DEFAULT
386 CHARSET=latin1
387 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
388
389 INSERT INTO federated.t1 (name, other) VALUES ('First Name', '1111');
390 INSERT INTO federated.t1 (name, other) VALUES ('Second Name', '2222');
391 INSERT INTO federated.t1 (name, other) VALUES ('Third Name', '3333');
392 SELECT * FROM federated.t1 WHERE name = 'Second Name';
393 SELECT * FROM federated.t1 WHERE other = '2222';
394 SELECT * FROM federated.t1 WHERE name = 'Third Name';
395 SELECT * FROM federated.t1 WHERE name = 'Third Name' AND other = '3333';
396
397 connection slave;
398 DROP TABLE IF EXISTS federated.t1;
399 CREATE TABLE federated.t1 (
400 `id` int NOT NULL auto_increment,
401 `name` char(32) NOT NULL DEFAULT '',
402 `bincol` binary(1) NOT NULL,
403 `floatval` decimal(5,2) NOT NULL DEFAULT 0.0,
404 `other` int NOT NULL DEFAULT 0,
405 PRIMARY KEY (id),
406 KEY nameoth(name, other),
407 KEY bincol(bincol),
408 KEY floatval(floatval));
409
410 # test other types of indexes
411 connection master;
412 DROP TABLE IF EXISTS federated.t1;
413 --replace_result $SLAVE_MYPORT SLAVE_PORT
414 eval CREATE TABLE federated.t1 (
415 `id` int NOT NULL auto_increment,
416 `name` char(32) NOT NULL DEFAULT '',
417 `bincol` binary(1) NOT NULL,
418 `floatval` decimal(5,2) NOT NULL DEFAULT 0.0,
419 `other` int NOT NULL DEFAULT 0,
420 PRIMARY KEY (id),
421 KEY nameoth(name,other),
422 KEY bincol(bincol),
423 KEY floatval(floatval))
424 ENGINE="FEDERATED"
425 DEFAULT CHARSET=latin1
426 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
427
428 INSERT INTO federated.t1 (name, bincol, floatval, other)
429 VALUES ('first', 0x65, 11.11, 1111);
430 INSERT INTO federated.t1 (name, bincol, floatval, other)
431 VALUES ('second', 0x66, 22.22, 2222);
432 INSERT INTO federated.t1 (name, bincol, floatval, other)
433 VALUES ('third', 'g', 22.22, 2222);
434 --sorted_result
435 SELECT * FROM federated.t1;
436 SELECT * FROM federated.t1 WHERE name = 'second';
437 SELECT * FROM federated.t1 WHERE bincol= 'f';
438 SELECT * FROM federated.t1 WHERE bincol= 0x66;
439 SELECT * FROM federated.t1 WHERE bincol= 0x67;
440 SELECT * FROM federated.t1 WHERE bincol= 'g';
441 SELECT * FROM federated.t1 WHERE floatval=11.11;
442 SELECT * FROM federated.t1 WHERE name='third';
443 --sorted_result
444 SELECT * FROM federated.t1 WHERE other=2222;
445 SELECT * FROM federated.t1 WHERE name='third' and other=2222;
446
447 # more multi-column indexes, in the primary key
448 connection slave;
449 DROP TABLE IF EXISTS federated.t1;
450 CREATE TABLE federated.t1 (
451 `id` int NOT NULL auto_increment,
452 `col1` int(10) NOT NULL DEFAULT 0,
453 `col2` varchar(64) NOT NULL DEFAULT '',
454 `col3` int(20) NOT NULL,
455 `col4` int(40) NOT NULL,
456 primary key (`id`, `col1`, `col2`, `col3`, `col4`),
457 key col1(col1),
458 key col2(col2),
459 key col3(col3),
460 key col4(col4));
461
462 connection master;
463 DROP TABLE IF EXISTS federated.t1;
464 --replace_result $SLAVE_MYPORT SLAVE_PORT
465 eval CREATE TABLE federated.t1 (
466 `id` int NOT NULL auto_increment,
467 `col1` int(10) NOT NULL DEFAULT 0,
468 `col2` varchar(64) NOT NULL DEFAULT '',
469 `col3` int(20) NOT NULL,
470 `col4` int(40) NOT NULL,
471 primary key (`id`, `col1`, `col2`, `col3`, `col4`),
472 key col1(col1),
473 key col2(col2),
474 key col3(col3),
475 key col4(col4))
476 ENGINE="FEDERATED"
477 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
478
479 INSERT INTO federated.t1 (col1, col2, col3, col4)
480 VALUES (1, 'one One', 11, 1111);
481 INSERT INTO federated.t1 (col1, col2, col3, col4)
482 VALUES (2, 'Two two', 22, 2222);
483 INSERT INTO federated.t1 (col1, col2, col3, col4)
484 VALUES (3, 'three Three', 33, 33333);
485 INSERT INTO federated.t1 (col1, col2, col3, col4)
486 VALUES (4, 'fourfourfour', 444, 4444444);
487 INSERT INTO federated.t1 (col1, col2, col3, col4)
488 VALUES (5, 'five 5 five five 5', 5, 55555);
489 INSERT INTO federated.t1 (col1, col2, col3, col4)
490 VALUES (6, 'six six Sixsix', 6666, 6);
491 INSERT INTO federated.t1 (col1, col2, col3, col4)
492 VALUES (7, 'seven Sevenseven', 77777, 7777);
493 INSERT INTO federated.t1 (col1, col2, col3, col4)
494 VALUES (8, 'eight eight eight', 88888, 88);
495 INSERT INTO federated.t1 (col1, col2, col3, col4)
496 VALUES (9, 'nine Nine', 999999, 999999);
497 INSERT INTO federated.t1 (col1, col2, col3, col4)
498 VALUES (10, 'Tenth ten TEN', 1010101, 1010);
499
500 SELECT * FROM federated.t1 WHERE col2 = 'two two';
501 SELECT * FROM federated.t1 WHERE col2 = 'two Two';
502 SELECT * FROM federated.t1 WHERE id = 3;
503 SELECT * FROM federated.t1 WHERE id = 3 AND col1 = 3;
504 SELECT * FROM federated.t1 WHERE id = 4 AND col1 = 4 AND col2 = 'Two two';
505 SELECT * FROM federated.t1 WHERE id = 4 AND col1 = 4 AND col2 = 'fourfourfour';
506 SELECT * FROM federated.t1 WHERE id = 5 AND col2 = 'five 5 five five 5'
507 AND col3 = 5;
508 SELECT * FROM federated.t1 WHERE id = 5 AND col2 = 'five 5 five five 5'
509 AND col3 = 5
510 AND col4 = 55555;
511 SELECT * FROM federated.t1 WHERE id = 5
512 AND col2 = 'Two two' AND col3 = 22
513 AND col4 = 33;
514 SELECT * FROM federated.t1 WHERE id = 5
515 AND col2 = 'five 5 five five 5' AND col3 = 5
516 AND col4 = 55555;
517 --sorted_result
518 SELECT * FROM federated.t1 WHERE (id = 5 AND col2 = 'five 5 five five 5')
519 OR (col2 = 'three Three' AND col3 = 33);
520 SELECT * FROM federated.t1 WHERE (id = 5 AND col2 = 'Two two')
521 OR (col2 = 444 AND col3 = 4444444);
522 --sorted_result
523 SELECT * FROM federated.t1 WHERE id = 1
524 OR col1 = 10
525 OR col2 = 'Two two'
526 OR col3 = 33
527 OR col4 = 4444444;
528 --sorted_result
529 SELECT * FROM federated.t1 WHERE id > 5;
530 --sorted_result
531 SELECT * FROM federated.t1 WHERE id >= 5;
532 --sorted_result
533 SELECT * FROM federated.t1 WHERE id < 5;
534 --sorted_result
535 SELECT * FROM federated.t1 WHERE id <= 5;
536 --sorted_result
537 SELECT * FROM federated.t1 WHERE id != 5;
538 --sorted_result
539 SELECT * FROM federated.t1 WHERE id > 3 AND id < 7;
540 --sorted_result
541 SELECT * FROM federated.t1 WHERE id > 3 AND id <= 7;
542 --sorted_result
543 SELECT * FROM federated.t1 WHERE id >= 3 AND id <= 7;
544 SELECT * FROM federated.t1 WHERE id < 3 AND id <= 7;
545 SELECT * FROM federated.t1 WHERE id < 3 AND id > 7;
546 --sorted_result
547 SELECT * FROM federated.t1 WHERE id < 3 OR id > 7;
548 SELECT * FROM federated.t1 WHERE col2 = 'three Three';
549 --sorted_result
550 SELECT * FROM federated.t1 WHERE col2 > 'one';
551 --sorted_result
552 SELECT * FROM federated.t1 WHERE col2 LIKE 's%';
553 SELECT * FROM federated.t1 WHERE col2 LIKE 'si%';
554 SELECT * FROM federated.t1 WHERE col2 LIKE 'se%';
555 --sorted_result
556 SELECT * FROM federated.t1 WHERE col2 NOT LIKE 'e%';
557 --sorted_result
558 SELECT * FROM federated.t1 WHERE col2 <> 'one One';
559
560 # more multi-column indexes, in the primary key
561 connection slave;
562 DROP TABLE IF EXISTS federated.t1;
563 CREATE TABLE federated.t1 (
564 `col1` varchar(8) NOT NULL DEFAULT '',
565 `col2` varchar(128) NOT NULL DEFAULT '',
566 `col3` varchar(20) NOT NULL DEFAULT '',
567 `col4` varchar(40) NOT NULL DEFAULT '',
568 primary key (`col1`, `col2`, `col3`, `col4`),
569 key 3key(`col2`,`col3`,`col4`),
570 key 2key (`col3`,`col4`),
571 key col4(col4));
572
573 connection master;
574 DROP TABLE IF EXISTS federated.t1;
575 --replace_result $SLAVE_MYPORT SLAVE_PORT
576 eval CREATE TABLE federated.t1 (
577 `col1` varchar(8) NOT NULL DEFAULT '',
578 `col2` varchar(128) NOT NULL DEFAULT '',
579 `col3` varchar(20) NOT NULL DEFAULT '',
580 `col4` varchar(40) NOT NULL DEFAULT '',
581 primary key (`col1`, `col2`, `col3`, `col4`),
582 key 3key(`col2`,`col3`,`col4`),
583 key 2key (`col3`,`col4`),
584 key col4(col4))
585 ENGINE="FEDERATED"
586 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
587
588 INSERT INTO federated.t1 (col1, col2, col3, col4)
589 VALUES ('aaaa', 'aaaaaaaaaaaaaaaaaaa', 'ababababab', 'acacacacacacacac');
590 INSERT INTO federated.t1 (col1, col2, col3, col4)
591 VALUES ('bbbb', 'bbbbbbbbbbbbbbbbbbb', 'bababababa', 'bcbcbcbcbcbcbcbc');
592 INSERT INTO federated.t1 (col1, col2, col3, col4)
593 VALUES ('cccc', 'ccccccccccccccccccc', 'cacacacaca', 'cbcbcbcbcbcbcbcb');
594 INSERT INTO federated.t1 (col1, col2, col3, col4)
595 VALUES ('dddd', 'ddddddddddddddddddd', 'dadadadada', 'dcdcdcdcdcdcdcdc');
596 INSERT INTO federated.t1 (col1, col2, col3, col4)
597 VALUES ('eeee', 'eeeeeeeeeeeeeeeeeee', 'eaeaeaeaea', 'ecececececececec');
598 INSERT INTO federated.t1 (col1, col2, col3, col4)
599 VALUES ('ffff', 'fffffffffffffffffff', 'fafafafafa', 'fcfcfcfcfcfcfcfc');
600 INSERT INTO federated.t1 (col1, col2, col3, col4)
601 VALUES ('gggg', 'ggggggggggggggggggg', 'gagagagaga', 'gcgcgcgcgcgcgcgc');
602 INSERT INTO federated.t1 (col1, col2, col3, col4)
603 VALUES ('hhhh', 'hhhhhhhhhhhhhhhhhhh', 'hahahahaha', 'hchchchchchchchc');
604
605 SELECT * FROM federated.t1 WHERE col1 = 'cccc';
606 SELECT * FROM federated.t1 WHERE col2 = 'eeeeeeeeeeeeeeeeeee';
607 SELECT * FROM federated.t1 WHERE col3 = 'bababababa';
608 SELECT * FROM federated.t1 WHERE col1 = 'gggg' AND col2 = 'ggggggggggggggggggg';
609 SELECT * FROM federated.t1 WHERE col1 = 'gggg' AND col3 = 'gagagagaga';
610 SELECT * FROM federated.t1 WHERE col1 = 'ffff' AND col4 = 'fcfcfcfcfcfcfcfc';
611 --sorted_result
612 SELECT * FROM federated.t1 WHERE col1 > 'bbbb';
613 --sorted_result
614 SELECT * FROM federated.t1 WHERE col1 >= 'bbbb';
615 SELECT * FROM federated.t1 WHERE col1 < 'bbbb';
616 --sorted_result
617 SELECT * FROM federated.t1 WHERE col1 <= 'bbbb';
618 --sorted_result
619 SELECT * FROM federated.t1 WHERE col1 <> 'bbbb';
620 SELECT * FROM federated.t1 WHERE col1 LIKE 'b%';
621 --sorted_result
622 SELECT * FROM federated.t1 WHERE col4 LIKE '%b%';
623 --sorted_result
624 SELECT * FROM federated.t1 WHERE col1 NOT LIKE 'c%';
625 SELECT * FROM federated.t1 WHERE col4 NOT LIKE '%c%';
626 connection slave;
627 DROP TABLE IF EXISTS federated.t1;
628 CREATE TABLE federated.t1 (
629 `col1` varchar(8) NOT NULL DEFAULT '',
630 `col2` int(8) NOT NULL DEFAULT 0,
631 `col3` varchar(8) NOT NULL DEFAULT '',
632 primary key (`col1`, `col2`, `col3`));
633
634 connection master;
635 DROP TABLE IF EXISTS federated.t1;
636 --replace_result $SLAVE_MYPORT SLAVE_PORT
637 eval CREATE TABLE federated.t1 (
638 `col1` varchar(8) NOT NULL DEFAULT '',
639 `col2` varchar(8) NOT NULL DEFAULT '',
640 `col3` varchar(8) NOT NULL DEFAULT '',
641 primary key (`col1`, `col2`, `col3`))
642 ENGINE="FEDERATED"
643 DEFAULT CHARSET=latin1
644 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
645
646 INSERT INTO federated.t1 VALUES ('a00', '110', 'cc0');
647 INSERT INTO federated.t1 VALUES ('aaa', '111', 'ccc');
648 INSERT INTO federated.t1 VALUES ('bbb', '222', 'yyy');
649 INSERT INTO federated.t1 VALUES ('ccc', '111', 'zzz');
650 INSERT INTO federated.t1 VALUES ('ccd', '112', 'zzzz');
651
652 # let's see what the foreign database says
653 connection slave;
654 --sorted_result
655 SELECT col3 FROM federated.t1 WHERE (
656 (col1 = 'aaa' AND col2 >= '111') OR col1 > 'aaa') AND
657 (col1 < 'ccc' OR ( col1 = 'ccc' AND col2 <= '111'));
658
659 connection master;
660 --sorted_result
661 SELECT col3 FROM federated.t1 WHERE (
662 (col1 = 'aaa' AND col2 >= '111') OR col1 > 'aaa') AND
663 (col1 < 'ccc' OR ( col1 = 'ccc' AND col2 <= '111'));
664
665 # test NULLs
666 connection slave;
667 DROP TABLE IF EXISTS federated.t1;
668 CREATE TABLE federated.t1 (
669 `id` int,
670 `name` varchar(32),
671 `floatval` float,
672 `other` int)
673 DEFAULT CHARSET=latin1;
674
675 connection master;
676 DROP TABLE IF EXISTS federated.t1;
677 --replace_result $SLAVE_MYPORT SLAVE_PORT
678 eval CREATE TABLE federated.t1 (
679 `id` int,
680 `name` varchar(32),
681 `floatval` float,
682 `other` int)
683 ENGINE="FEDERATED"
684 DEFAULT CHARSET=latin1
685 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
686
687 # these both should be the same
688 INSERT INTO federated.t1 values (NULL, NULL, NULL, NULL);
689 INSERT INTO federated.t1 values ();
690 INSERT INTO federated.t1 (id) VALUES (1);
691 INSERT INTO federated.t1 (name, floatval, other)
692 VALUES ('foo', 33.33333332, NULL);
693 INSERT INTO federated.t1 (name, floatval, other)
694 VALUES (0, 00.3333, NULL);
695 --sorted_result
696 SELECT * FROM federated.t1;
697 SELECT count(*) FROM federated.t1
698 WHERE id IS NULL
699 AND name IS NULL
700 AND floatval IS NULL
701 AND other IS NULL;
702
703 connection slave;
704 DROP TABLE IF EXISTS federated.t1;
705 CREATE TABLE federated.t1 (
706 `blurb_id` int NOT NULL DEFAULT 0,
707 `blurb` text default '',
708 PRIMARY KEY (blurb_id))
709 DEFAULT CHARSET=latin1;
710
711 connection master;
712 DROP TABLE IF EXISTS federated.t1;
713 --replace_result $SLAVE_MYPORT SLAVE_PORT
714 eval CREATE TABLE federated.t1 (
715 `blurb_id` int NOT NULL DEFAULT 0,
716 `blurb` text default '',
717 PRIMARY KEY (blurb_id))
718 ENGINE="FEDERATED"
719 DEFAULT CHARSET=latin1
720 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
721
722 INSERT INTO federated.t1 VALUES (1, " MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values.");
723 INSERT INTO federated.t1 VALUES (2, "All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE.");
724 INSERT INTO federated.t1 VALUES (3, " A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined. ");
725 INSERT INTO federated.t1 VALUES(4, "Die �bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest f�r jemanden, der seine Zielsprache ernst nimmt:");
726 --sorted_result
727 SELECT * FROM federated.t1;
728
729 connection slave;
730 DROP TABLE IF EXISTS federated.t1;
731 CREATE TABLE federated.t1 (
732 `a` int NOT NULL,
733 `b` int NOT NULL,
734 `c` int NOT NULL,
735 PRIMARY KEY (a),key(b));
736
737 connection master;
738 DROP TABLE IF EXISTS federated.t1;
739 --replace_result $SLAVE_MYPORT SLAVE_PORT
740 eval CREATE TABLE federated.t1 (
741 `a` int NOT NULL,
742 `b` int NOT NULL,
743 `c` int NOT NULL,
744 PRIMARY KEY (a),
745 KEY (b))
746 ENGINE="FEDERATED"
747 DEFAULT CHARSET=latin1
748 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
749
750 INSERT INTO federated.t1 VALUES (3,3,3),(1,1,1),(2,2,2),(4,4,4);
751
752 connection slave;
753 DROP TABLE IF EXISTS federated.t1;
754 CREATE TABLE federated.t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8
755 int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17
756 int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int,
757 i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34
758 int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int,
759 i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51
760 int, i52 int, i53 int, i54 int, i55 int, i56 int, i57 int, i58 int, i59 int,
761 i60 int, i61 int, i62 int, i63 int, i64 int, i65 int, i66 int, i67 int, i68
762 int, i69 int, i70 int, i71 int, i72 int, i73 int, i74 int, i75 int, i76 int,
763 i77 int, i78 int, i79 int, i80 int, i81 int, i82 int, i83 int, i84 int, i85
764 int, i86 int, i87 int, i88 int, i89 int, i90 int, i91 int, i92 int, i93 int,
765 i94 int, i95 int, i96 int, i97 int, i98 int, i99 int, i100 int, i101 int, i102
766 int, i103 int, i104 int, i105 int, i106 int, i107 int, i108 int, i109 int, i110
767 int, i111 int, i112 int, i113 int, i114 int, i115 int, i116 int, i117 int, i118
768 int, i119 int, i120 int, i121 int, i122 int, i123 int, i124 int, i125 int, i126
769 int, i127 int, i128 int, i129 int, i130 int, i131 int, i132 int, i133 int, i134
770 int, i135 int, i136 int, i137 int, i138 int, i139 int, i140 int, i141 int, i142
771 int, i143 int, i144 int, i145 int, i146 int, i147 int, i148 int, i149 int, i150
772 int, i151 int, i152 int, i153 int, i154 int, i155 int, i156 int, i157 int, i158
773 int, i159 int, i160 int, i161 int, i162 int, i163 int, i164 int, i165 int, i166
774 int, i167 int, i168 int, i169 int, i170 int, i171 int, i172 int, i173 int, i174
775 int, i175 int, i176 int, i177 int, i178 int, i179 int, i180 int, i181 int, i182
776 int, i183 int, i184 int, i185 int, i186 int, i187 int, i188 int, i189 int, i190
777 int, i191 int, i192 int, i193 int, i194 int, i195 int, i196 int, i197 int, i198
778 int, i199 int, i200 int, i201 int, i202 int, i203 int, i204 int, i205 int, i206
779 int, i207 int, i208 int, i209 int, i210 int, i211 int, i212 int, i213 int, i214
780 int, i215 int, i216 int, i217 int, i218 int, i219 int, i220 int, i221 int, i222
781 int, i223 int, i224 int, i225 int, i226 int, i227 int, i228 int, i229 int, i230
782 int, i231 int, i232 int, i233 int, i234 int, i235 int, i236 int, i237 int, i238
783 int, i239 int, i240 int, i241 int, i242 int, i243 int, i244 int, i245 int, i246
784 int, i247 int, i248 int, i249 int, i250 int, i251 int, i252 int, i253 int, i254
785 int, i255 int, i256 int, i257 int, i258 int, i259 int, i260 int, i261 int, i262
786 int, i263 int, i264 int, i265 int, i266 int, i267 int, i268 int, i269 int, i270
787 int, i271 int, i272 int, i273 int, i274 int, i275 int, i276 int, i277 int, i278
788 int, i279 int, i280 int, i281 int, i282 int, i283 int, i284 int, i285 int, i286
789 int, i287 int, i288 int, i289 int, i290 int, i291 int, i292 int, i293 int, i294
790 int, i295 int, i296 int, i297 int, i298 int, i299 int, i300 int, i301 int, i302
791 int, i303 int, i304 int, i305 int, i306 int, i307 int, i308 int, i309 int, i310
792 int, i311 int, i312 int, i313 int, i314 int, i315 int, i316 int, i317 int, i318
793 int, i319 int, i320 int, i321 int, i322 int, i323 int, i324 int, i325 int, i326
794 int, i327 int, i328 int, i329 int, i330 int, i331 int, i332 int, i333 int, i334
795 int, i335 int, i336 int, i337 int, i338 int, i339 int, i340 int, i341 int, i342
796 int, i343 int, i344 int, i345 int, i346 int, i347 int, i348 int, i349 int, i350
797 int, i351 int, i352 int, i353 int, i354 int, i355 int, i356 int, i357 int, i358
798 int, i359 int, i360 int, i361 int, i362 int, i363 int, i364 int, i365 int, i366
799 int, i367 int, i368 int, i369 int, i370 int, i371 int, i372 int, i373 int, i374
800 int, i375 int, i376 int, i377 int, i378 int, i379 int, i380 int, i381 int, i382
801 int, i383 int, i384 int, i385 int, i386 int, i387 int, i388 int, i389 int, i390
802 int, i391 int, i392 int, i393 int, i394 int, i395 int, i396 int, i397 int, i398
803 int, i399 int, i400 int, i401 int, i402 int, i403 int, i404 int, i405 int, i406
804 int, i407 int, i408 int, i409 int, i410 int, i411 int, i412 int, i413 int, i414
805 int, i415 int, i416 int, i417 int, i418 int, i419 int, i420 int, i421 int, i422
806 int, i423 int, i424 int, i425 int, i426 int, i427 int, i428 int, i429 int, i430
807 int, i431 int, i432 int, i433 int, i434 int, i435 int, i436 int, i437 int, i438
808 int, i439 int, i440 int, i441 int, i442 int, i443 int, i444 int, i445 int, i446
809 int, i447 int, i448 int, i449 int, i450 int, i451 int, i452 int, i453 int, i454
810 int, i455 int, i456 int, i457 int, i458 int, i459 int, i460 int, i461 int, i462
811 int, i463 int, i464 int, i465 int, i466 int, i467 int, i468 int, i469 int, i470
812 int, i471 int, i472 int, i473 int, i474 int, i475 int, i476 int, i477 int, i478
813 int, i479 int, i480 int, i481 int, i482 int, i483 int, i484 int, i485 int, i486
814 int, i487 int, i488 int, i489 int, i490 int, i491 int, i492 int, i493 int, i494
815 int, i495 int, i496 int, i497 int, i498 int, i499 int, i500 int, i501 int, i502
816 int, i503 int, i504 int, i505 int, i506 int, i507 int, i508 int, i509 int, i510
817 int, i511 int, i512 int, i513 int, i514 int, i515 int, i516 int, i517 int, i518
818 int, i519 int, i520 int, i521 int, i522 int, i523 int, i524 int, i525 int, i526
819 int, i527 int, i528 int, i529 int, i530 int, i531 int, i532 int, i533 int, i534
820 int, i535 int, i536 int, i537 int, i538 int, i539 int, i540 int, i541 int, i542
821 int, i543 int, i544 int, i545 int, i546 int, i547 int, i548 int, i549 int, i550
822 int, i551 int, i552 int, i553 int, i554 int, i555 int, i556 int, i557 int, i558
823 int, i559 int, i560 int, i561 int, i562 int, i563 int, i564 int, i565 int, i566
824 int, i567 int, i568 int, i569 int, i570 int, i571 int, i572 int, i573 int, i574
825 int, i575 int, i576 int, i577 int, i578 int, i579 int, i580 int, i581 int, i582
826 int, i583 int, i584 int, i585 int, i586 int, i587 int, i588 int, i589 int, i590
827 int, i591 int, i592 int, i593 int, i594 int, i595 int, i596 int, i597 int, i598
828 int, i599 int, i600 int, i601 int, i602 int, i603 int, i604 int, i605 int, i606
829 int, i607 int, i608 int, i609 int, i610 int, i611 int, i612 int, i613 int, i614
830 int, i615 int, i616 int, i617 int, i618 int, i619 int, i620 int, i621 int, i622
831 int, i623 int, i624 int, i625 int, i626 int, i627 int, i628 int, i629 int, i630
832 int, i631 int, i632 int, i633 int, i634 int, i635 int, i636 int, i637 int, i638
833 int, i639 int, i640 int, i641 int, i642 int, i643 int, i644 int, i645 int, i646
834 int, i647 int, i648 int, i649 int, i650 int, i651 int, i652 int, i653 int, i654
835 int, i655 int, i656 int, i657 int, i658 int, i659 int, i660 int, i661 int, i662
836 int, i663 int, i664 int, i665 int, i666 int, i667 int, i668 int, i669 int, i670
837 int, i671 int, i672 int, i673 int, i674 int, i675 int, i676 int, i677 int, i678
838 int, i679 int, i680 int, i681 int, i682 int, i683 int, i684 int, i685 int, i686
839 int, i687 int, i688 int, i689 int, i690 int, i691 int, i692 int, i693 int, i694
840 int, i695 int, i696 int, i697 int, i698 int, i699 int, i700 int, i701 int, i702
841 int, i703 int, i704 int, i705 int, i706 int, i707 int, i708 int, i709 int, i710
842 int, i711 int, i712 int, i713 int, i714 int, i715 int, i716 int, i717 int, i718
843 int, i719 int, i720 int, i721 int, i722 int, i723 int, i724 int, i725 int, i726
844 int, i727 int, i728 int, i729 int, i730 int, i731 int, i732 int, i733 int, i734
845 int, i735 int, i736 int, i737 int, i738 int, i739 int, i740 int, i741 int, i742
846 int, i743 int, i744 int, i745 int, i746 int, i747 int, i748 int, i749 int, i750
847 int, i751 int, i752 int, i753 int, i754 int, i755 int, i756 int, i757 int, i758
848 int, i759 int, i760 int, i761 int, i762 int, i763 int, i764 int, i765 int, i766
849 int, i767 int, i768 int, i769 int, i770 int, i771 int, i772 int, i773 int, i774
850 int, i775 int, i776 int, i777 int, i778 int, i779 int, i780 int, i781 int, i782
851 int, i783 int, i784 int, i785 int, i786 int, i787 int, i788 int, i789 int, i790
852 int, i791 int, i792 int, i793 int, i794 int, i795 int, i796 int, i797 int, i798
853 int, i799 int, i800 int, i801 int, i802 int, i803 int, i804 int, i805 int, i806
854 int, i807 int, i808 int, i809 int, i810 int, i811 int, i812 int, i813 int, i814
855 int, i815 int, i816 int, i817 int, i818 int, i819 int, i820 int, i821 int, i822
856 int, i823 int, i824 int, i825 int, i826 int, i827 int, i828 int, i829 int, i830
857 int, i831 int, i832 int, i833 int, i834 int, i835 int, i836 int, i837 int, i838
858 int, i839 int, i840 int, i841 int, i842 int, i843 int, i844 int, i845 int, i846
859 int, i847 int, i848 int, i849 int, i850 int, i851 int, i852 int, i853 int, i854
860 int, i855 int, i856 int, i857 int, i858 int, i859 int, i860 int, i861 int, i862
861 int, i863 int, i864 int, i865 int, i866 int, i867 int, i868 int, i869 int, i870
862 int, i871 int, i872 int, i873 int, i874 int, i875 int, i876 int, i877 int, i878
863 int, i879 int, i880 int, i881 int, i882 int, i883 int, i884 int, i885 int, i886
864 int, i887 int, i888 int, i889 int, i890 int, i891 int, i892 int, i893 int, i894
865 int, i895 int, i896 int, i897 int, i898 int, i899 int, i900 int, i901 int, i902
866 int, i903 int, i904 int, i905 int, i906 int, i907 int, i908 int, i909 int, i910
867 int, i911 int, i912 int, i913 int, i914 int, i915 int, i916 int, i917 int, i918
868 int, i919 int, i920 int, i921 int, i922 int, i923 int, i924 int, i925 int, i926
869 int, i927 int, i928 int, i929 int, i930 int, i931 int, i932 int, i933 int, i934
870 int, i935 int, i936 int, i937 int, i938 int, i939 int, i940 int, i941 int, i942
871 int, i943 int, i944 int, i945 int, i946 int, i947 int, i948 int, i949 int, i950
872 int, i951 int, i952 int, i953 int, i954 int, i955 int, i956 int, i957 int, i958
873 int, i959 int, i960 int, i961 int, i962 int, i963 int, i964 int, i965 int, i966
874 int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974
875 int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982
876 int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990
877 int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998
878 int, i999 int, i1000 int, b varchar(256)) row_format=dynamic;
879
880 connection master;
881 DROP TABLE IF EXISTS federated.t1;
882 --replace_result $SLAVE_MYPORT SLAVE_PORT
883 eval CREATE TABLE federated.t1
884 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8
885 int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int,
886 i17 int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int,
887 i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34
888 int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int,
889 i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51
890 int, i52 int, i53 int, i54 int, i55 int, i56 int, i57 int, i58 int, i59 int,
891 i60 int, i61 int, i62 int, i63 int, i64 int, i65 int, i66 int, i67 int, i68
892 int, i69 int, i70 int, i71 int, i72 int, i73 int, i74 int, i75 int, i76 int,
893 i77 int, i78 int, i79 int, i80 int, i81 int, i82 int, i83 int, i84 int, i85
894 int, i86 int, i87 int, i88 int, i89 int, i90 int, i91 int, i92 int, i93 int,
895 i94 int, i95 int, i96 int, i97 int, i98 int, i99 int, i100 int, i101 int, i102
896 int, i103 int, i104 int, i105 int, i106 int, i107 int, i108 int, i109 int, i110
897 int, i111 int, i112 int, i113 int, i114 int, i115 int, i116 int, i117 int, i118
898 int, i119 int, i120 int, i121 int, i122 int, i123 int, i124 int, i125 int, i126
899 int, i127 int, i128 int, i129 int, i130 int, i131 int, i132 int, i133 int, i134
900 int, i135 int, i136 int, i137 int, i138 int, i139 int, i140 int, i141 int, i142
901 int, i143 int, i144 int, i145 int, i146 int, i147 int, i148 int, i149 int, i150
902 int, i151 int, i152 int, i153 int, i154 int, i155 int, i156 int, i157 int, i158
903 int, i159 int, i160 int, i161 int, i162 int, i163 int, i164 int, i165 int, i166
904 int, i167 int, i168 int, i169 int, i170 int, i171 int, i172 int, i173 int, i174
905 int, i175 int, i176 int, i177 int, i178 int, i179 int, i180 int, i181 int, i182
906 int, i183 int, i184 int, i185 int, i186 int, i187 int, i188 int, i189 int, i190
907 int, i191 int, i192 int, i193 int, i194 int, i195 int, i196 int, i197 int, i198
908 int, i199 int, i200 int, i201 int, i202 int, i203 int, i204 int, i205 int, i206
909 int, i207 int, i208 int, i209 int, i210 int, i211 int, i212 int, i213 int, i214
910 int, i215 int, i216 int, i217 int, i218 int, i219 int, i220 int, i221 int, i222
911 int, i223 int, i224 int, i225 int, i226 int, i227 int, i228 int, i229 int, i230
912 int, i231 int, i232 int, i233 int, i234 int, i235 int, i236 int, i237 int, i238
913 int, i239 int, i240 int, i241 int, i242 int, i243 int, i244 int, i245 int, i246
914 int, i247 int, i248 int, i249 int, i250 int, i251 int, i252 int, i253 int, i254
915 int, i255 int, i256 int, i257 int, i258 int, i259 int, i260 int, i261 int, i262
916 int, i263 int, i264 int, i265 int, i266 int, i267 int, i268 int, i269 int, i270
917 int, i271 int, i272 int, i273 int, i274 int, i275 int, i276 int, i277 int, i278
918 int, i279 int, i280 int, i281 int, i282 int, i283 int, i284 int, i285 int, i286
919 int, i287 int, i288 int, i289 int, i290 int, i291 int, i292 int, i293 int, i294
920 int, i295 int, i296 int, i297 int, i298 int, i299 int, i300 int, i301 int, i302
921 int, i303 int, i304 int, i305 int, i306 int, i307 int, i308 int, i309 int, i310
922 int, i311 int, i312 int, i313 int, i314 int, i315 int, i316 int, i317 int, i318
923 int, i319 int, i320 int, i321 int, i322 int, i323 int, i324 int, i325 int, i326
924 int, i327 int, i328 int, i329 int, i330 int, i331 int, i332 int, i333 int, i334
925 int, i335 int, i336 int, i337 int, i338 int, i339 int, i340 int, i341 int, i342
926 int, i343 int, i344 int, i345 int, i346 int, i347 int, i348 int, i349 int, i350
927 int, i351 int, i352 int, i353 int, i354 int, i355 int, i356 int, i357 int, i358
928 int, i359 int, i360 int, i361 int, i362 int, i363 int, i364 int, i365 int, i366
929 int, i367 int, i368 int, i369 int, i370 int, i371 int, i372 int, i373 int, i374
930 int, i375 int, i376 int, i377 int, i378 int, i379 int, i380 int, i381 int, i382
931 int, i383 int, i384 int, i385 int, i386 int, i387 int, i388 int, i389 int, i390
932 int, i391 int, i392 int, i393 int, i394 int, i395 int, i396 int, i397 int, i398
933 int, i399 int, i400 int, i401 int, i402 int, i403 int, i404 int, i405 int, i406
934 int, i407 int, i408 int, i409 int, i410 int, i411 int, i412 int, i413 int, i414
935 int, i415 int, i416 int, i417 int, i418 int, i419 int, i420 int, i421 int, i422
936 int, i423 int, i424 int, i425 int, i426 int, i427 int, i428 int, i429 int, i430
937 int, i431 int, i432 int, i433 int, i434 int, i435 int, i436 int, i437 int, i438
938 int, i439 int, i440 int, i441 int, i442 int, i443 int, i444 int, i445 int, i446
939 int, i447 int, i448 int, i449 int, i450 int, i451 int, i452 int, i453 int, i454
940 int, i455 int, i456 int, i457 int, i458 int, i459 int, i460 int, i461 int, i462
941 int, i463 int, i464 int, i465 int, i466 int, i467 int, i468 int, i469 int, i470
942 int, i471 int, i472 int, i473 int, i474 int, i475 int, i476 int, i477 int, i478
943 int, i479 int, i480 int, i481 int, i482 int, i483 int, i484 int, i485 int, i486
944 int, i487 int, i488 int, i489 int, i490 int, i491 int, i492 int, i493 int, i494
945 int, i495 int, i496 int, i497 int, i498 int, i499 int, i500 int, i501 int, i502
946 int, i503 int, i504 int, i505 int, i506 int, i507 int, i508 int, i509 int, i510
947 int, i511 int, i512 int, i513 int, i514 int, i515 int, i516 int, i517 int, i518
948 int, i519 int, i520 int, i521 int, i522 int, i523 int, i524 int, i525 int, i526
949 int, i527 int, i528 int, i529 int, i530 int, i531 int, i532 int, i533 int, i534
950 int, i535 int, i536 int, i537 int, i538 int, i539 int, i540 int, i541 int, i542
951 int, i543 int, i544 int, i545 int, i546 int, i547 int, i548 int, i549 int, i550
952 int, i551 int, i552 int, i553 int, i554 int, i555 int, i556 int, i557 int, i558
953 int, i559 int, i560 int, i561 int, i562 int, i563 int, i564 int, i565 int, i566
954 int, i567 int, i568 int, i569 int, i570 int, i571 int, i572 int, i573 int, i574
955 int, i575 int, i576 int, i577 int, i578 int, i579 int, i580 int, i581 int, i582
956 int, i583 int, i584 int, i585 int, i586 int, i587 int, i588 int, i589 int, i590
957 int, i591 int, i592 int, i593 int, i594 int, i595 int, i596 int, i597 int, i598
958 int, i599 int, i600 int, i601 int, i602 int, i603 int, i604 int, i605 int, i606
959 int, i607 int, i608 int, i609 int, i610 int, i611 int, i612 int, i613 int, i614
960 int, i615 int, i616 int, i617 int, i618 int, i619 int, i620 int, i621 int, i622
961 int, i623 int, i624 int, i625 int, i626 int, i627 int, i628 int, i629 int, i630
962 int, i631 int, i632 int, i633 int, i634 int, i635 int, i636 int, i637 int, i638
963 int, i639 int, i640 int, i641 int, i642 int, i643 int, i644 int, i645 int, i646
964 int, i647 int, i648 int, i649 int, i650 int, i651 int, i652 int, i653 int, i654
965 int, i655 int, i656 int, i657 int, i658 int, i659 int, i660 int, i661 int, i662
966 int, i663 int, i664 int, i665 int, i666 int, i667 int, i668 int, i669 int, i670
967 int, i671 int, i672 int, i673 int, i674 int, i675 int, i676 int, i677 int, i678
968 int, i679 int, i680 int, i681 int, i682 int, i683 int, i684 int, i685 int, i686
969 int, i687 int, i688 int, i689 int, i690 int, i691 int, i692 int, i693 int, i694
970 int, i695 int, i696 int, i697 int, i698 int, i699 int, i700 int, i701 int, i702
971 int, i703 int, i704 int, i705 int, i706 int, i707 int, i708 int, i709 int, i710
972 int, i711 int, i712 int, i713 int, i714 int, i715 int, i716 int, i717 int, i718
973 int, i719 int, i720 int, i721 int, i722 int, i723 int, i724 int, i725 int, i726
974 int, i727 int, i728 int, i729 int, i730 int, i731 int, i732 int, i733 int, i734
975 int, i735 int, i736 int, i737 int, i738 int, i739 int, i740 int, i741 int, i742
976 int, i743 int, i744 int, i745 int, i746 int, i747 int, i748 int, i749 int, i750
977 int, i751 int, i752 int, i753 int, i754 int, i755 int, i756 int, i757 int, i758
978 int, i759 int, i760 int, i761 int, i762 int, i763 int, i764 int, i765 int, i766
979 int, i767 int, i768 int, i769 int, i770 int, i771 int, i772 int, i773 int, i774
980 int, i775 int, i776 int, i777 int, i778 int, i779 int, i780 int, i781 int, i782
981 int, i783 int, i784 int, i785 int, i786 int, i787 int, i788 int, i789 int, i790
982 int, i791 int, i792 int, i793 int, i794 int, i795 int, i796 int, i797 int, i798
983 int, i799 int, i800 int, i801 int, i802 int, i803 int, i804 int, i805 int, i806
984 int, i807 int, i808 int, i809 int, i810 int, i811 int, i812 int, i813 int, i814
985 int, i815 int, i816 int, i817 int, i818 int, i819 int, i820 int, i821 int, i822
986 int, i823 int, i824 int, i825 int, i826 int, i827 int, i828 int, i829 int, i830
987 int, i831 int, i832 int, i833 int, i834 int, i835 int, i836 int, i837 int, i838
988 int, i839 int, i840 int, i841 int, i842 int, i843 int, i844 int, i845 int, i846
989 int, i847 int, i848 int, i849 int, i850 int, i851 int, i852 int, i853 int, i854
990 int, i855 int, i856 int, i857 int, i858 int, i859 int, i860 int, i861 int, i862
991 int, i863 int, i864 int, i865 int, i866 int, i867 int, i868 int, i869 int, i870
992 int, i871 int, i872 int, i873 int, i874 int, i875 int, i876 int, i877 int, i878
993 int, i879 int, i880 int, i881 int, i882 int, i883 int, i884 int, i885 int, i886
994 int, i887 int, i888 int, i889 int, i890 int, i891 int, i892 int, i893 int, i894
995 int, i895 int, i896 int, i897 int, i898 int, i899 int, i900 int, i901 int, i902
996 int, i903 int, i904 int, i905 int, i906 int, i907 int, i908 int, i909 int, i910
997 int, i911 int, i912 int, i913 int, i914 int, i915 int, i916 int, i917 int, i918
998 int, i919 int, i920 int, i921 int, i922 int, i923 int, i924 int, i925 int, i926
999 int, i927 int, i928 int, i929 int, i930 int, i931 int, i932 int, i933 int, i934
1000 int, i935 int, i936 int, i937 int, i938 int, i939 int, i940 int, i941 int, i942
1001 int, i943 int, i944 int, i945 int, i946 int, i947 int, i948 int, i949 int, i950
1002 int, i951 int, i952 int, i953 int, i954 int, i955 int, i956 int, i957 int, i958
1003 int, i959 int, i960 int, i961 int, i962 int, i963 int, i964 int, i965 int, i966
1004 int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974
1005 int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982
1006 int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990
1007 int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998
1008 int, i999 int, i1000 int, b varchar(256))
1009 row_format=dynamic
1010 ENGINE="FEDERATED"
1011 DEFAULT CHARSET=latin1
1012 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
1013
1014 INSERT INTO federated.t1
1015 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1016 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1017 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1018 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1019 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1020 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1021 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1022 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1023 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1024 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1025 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1026 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1027 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1028 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1029 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1030 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1031 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1032 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1033 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1034 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1035 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1036 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1037 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1038 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1039 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1040 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1041 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1042 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1043 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1044 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1045 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1046 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1047 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1048 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1049 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1050 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1051 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1052 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1053 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, "PatrickG");
1054 UPDATE federated.t1 SET b=repeat('a',256);
1055 UPDATE federated.t1 SET i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0, i8=0, i9=0, i10=0;
1056 SELECT * FROM federated.t1 WHERE i9=0 and i10=0;
1057 UPDATE federated.t1 SET i50=20;
1058 SELECT * FROM federated.t1;
1059 DELETE FROM federated.t1 WHERE i51=20;
1060 SELECT * FROM federated.t1;
1061 DELETE FROM federated.t1 WHERE i50=20;
1062 SELECT * FROM federated.t1;
1063
1064 connection slave;
1065 DROP TABLE IF EXISTS federated.t1;
1066 CREATE TABLE federated.t1 (id int NOT NULL auto_increment, code char(20) NOT NULL, fileguts blob NOT NULL, creation_date datetime, entered_time datetime default '2004-04-04 04:04:04', PRIMARY KEY(id), index(code), index(fileguts(10))) DEFAULT CHARSET=latin1;
1067
1068 connection master;
1069 DROP TABLE IF EXISTS federated.t1;
1070 --replace_result $SLAVE_MYPORT SLAVE_PORT
1071 eval CREATE TABLE federated.t1 (
1072 id int NOT NULL auto_increment,
1073 code char(20) NOT NULL,
1074 fileguts blob NOT NULL,
1075 creation_date datetime,
1076 entered_time datetime default '2004-04-04 04:04:04',
1077 PRIMARY KEY(id),
1078 index(code),
1079 index(fileguts(10)))
1080 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
1081 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
1082 INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('ASDFWERQWETWETAWETA', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2003-03-03 03:03:03');
1083 INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('DEUEUEUEUEUEUEUEUEU', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2004-04-04 04:04:04');
1084 INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('DEUEUEUEUEUEUEUEUEU', 'jimbob', '2004-04-04 04:04:04');
1085 --sorted_result
1086 SELECT * FROM federated.t1;
1087 # test blob indexes
1088 SELECT * FROM federated.t1 WHERE fileguts = 'jimbob';
1089
1090 # test blob with binary
1091 connection slave;
1092 DROP TABLE IF EXISTS federated.t1;
1093 CREATE TABLE federated.t1 (`a` BLOB);
1094
1095 connection master;
1096 DROP TABLE IF EXISTS federated.t1;
1097 --replace_result $SLAVE_MYPORT SLAVE_PORT
1098 eval CREATE TABLE federated.t1 (
1099 `a` BLOB)
1100 ENGINE="FEDERATED"
1101 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
1102
1103 INSERT INTO federated.t1 VALUES (0x00);
1104 INSERT INTO federated.t1 VALUES (0x0001);
1105 INSERT INTO federated.t1 VALUES (0x0100);
1106 --sorted_result
1107 SELECT HEX(a) FROM federated.t1;
1108
1109 # # simple tests for cyrillic, given to me by
1110 # DROP TABLE IF EXISTS federated.t1;
1111 # --replace_result $SLAVE_MYPORT SLAVE_PORT
1112 # eval CREATE TABLE federated.t1
1113 # (a char(20)) charset=cp1251
1114 # ENGINE="FEDERATED" CONNECTION="mysql://[email protected]:$SLAVE_MYPORT/federated/t1";
1115 # #
1116 # connection slave;
1117 # DROP TABLE IF EXISTS federated.t1;
1118 # CREATE TABLE federated.t1 (a char(20)) charset=cp1251;
1119 # #
1120 # connection master;
1121 # INSERT INTO federated.t1 values (_cp1251'�-���-1');
1122 # INSERT INTO federated.t1 values (_cp1251'�-���-2');
1123 # SELECT * FROM federated.t1;
1124 # SET names cp1251;
1125 # INSERT INTO federated.t1 values ('�-���-3');
1126 # INSERT INTO federated.t1 values ('�-Ũ�-4');
1127 # SELECT * FROM federated.t1;
1128 # SELECT hex(a) from federated.t1;
1129 # SELECT hex(a) from federated.t1 ORDER BY a desc;
1130 # UPDATE federated.t1 SET a='�-���-1�����' WHERE a='�-���-1';
1131 # SELECT * FROM federated.t1;
1132 # DELETE FROM federated.t1 WHERE a='�-Ũ�-4';
1133 # SELECT * FROM federated.t1;
1134 # DELETE FROM federated.t1 WHERE a>'�-';
1135 # SELECT * FROM federated.t1;
1136 # SET names default;
1137 # DROP TABLE IF EXISTS federated.t1;
1138
1139 #
1140 # DROP TABLE IF EXISTS federated.t1;
1141 #
1142
1143 # test joins with non-federated table
1144 connection slave;
1145 DROP TABLE IF EXISTS federated.t1;
1146 CREATE TABLE federated.t1 (
1147 `id` int(20) NOT NULL auto_increment,
1148 `country_id` int(20) NOT NULL DEFAULT 0,
1149 `name` varchar(32),
1150 `other` varchar(20),
1151 PRIMARY KEY (`id`),
1152 key (country_id));
1153
1154 connection master;
1155 DROP TABLE IF EXISTS federated.countries;
1156 CREATE TABLE federated.countries (
1157 `id` int(20) NOT NULL auto_increment,
1158 `country` varchar(32),
1159 PRIMARY KEY (id));
1160 INSERT INTO federated.countries (country) VALUES ('India');
1161 INSERT INTO federated.countries (country) VALUES ('Germany');
1162 INSERT INTO federated.countries (country) VALUES ('Italy');
1163 INSERT INTO federated.countries (country) VALUES ('Finland');
1164 INSERT INTO federated.countries (country) VALUES ('Ukraine');
1165
1166 DROP TABLE IF EXISTS federated.t1;
1167 --replace_result $SLAVE_MYPORT SLAVE_PORT
1168 eval CREATE TABLE federated.t1 (
1169 `id` int(20) NOT NULL auto_increment,
1170 `country_id` int(20) NOT NULL DEFAULT 0,
1171 `name` varchar(32),
1172 `other` varchar(20),
1173 PRIMARY KEY (`id`),
1174 KEY (country_id) )
1175 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
1176 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
1177
1178 INSERT INTO federated.t1 (name, country_id, other) VALUES ('Kumar', 1, 11111);
1179 INSERT INTO federated.t1 (name, country_id, other) VALUES ('Lenz', 2, 22222);
1180 INSERT INTO federated.t1 (name, country_id, other) VALUES ('Marizio', 3, 33333);
1181 INSERT INTO federated.t1 (name, country_id, other) VALUES ('Monty', 4, 33333);
1182 INSERT INTO federated.t1 (name, country_id, other) VALUES ('Sanja', 5, 33333);
1183
1184 #inner join
1185 --sorted_result
1186 SELECT federated.t1.name AS name, federated.t1.country_id AS country_id,
1187 federated.t1.other AS other, federated.countries.country AS country
1188 FROM federated.t1, federated.countries WHERE
1189 federated.t1.country_id = federated.countries.id;
1190
1191 SELECT federated.t1.name AS name, federated.t1.country_id AS country_id,
1192 federated.t1.other AS other, federated.countries.country AS country
1193 FROM federated.t1 INNER JOIN federated.countries ON
1194 federated.t1.country_id = federated.countries.id;
1195
1196 SELECT federated.t1.name AS name, federated.t1.country_id AS country_id,
1197 federated.t1.other AS other, federated.countries.country AS country
1198 FROM federated.t1 INNER JOIN federated.countries ON
1199 federated.t1.country_id = federated.countries.id
1200 WHERE federated.t1.name = 'Monty';
1201
1202 #left join
1203 SELECT federated.t1.*, federated.countries.country
1204 FROM federated.t1 LEFT JOIN federated.countries
1205 ON federated.t1.country_id = federated.countries.id
1206 ORDER BY federated.countries.id;
1207
1208 SELECT federated.t1.*, federated.countries.country
1209 FROM federated.t1 LEFT JOIN federated.countries
1210 ON federated.t1.country_id = federated.countries.id
1211 ORDER BY federated.countries.country;
1212
1213 #right join
1214 SELECT federated.t1.*, federated.countries.country
1215 FROM federated.t1 RIGHT JOIN federated.countries
1216 ON federated.t1.country_id = federated.countries.id
1217 ORDER BY federated.t1.country_id;
1218
1219 DROP TABLE federated.countries;
1220
1221 #BEGIN optimize and repair tests
1222 OPTIMIZE TABLE federated.t1;
1223 REPAIR TABLE federated.t1;
1224 REPAIR TABLE federated.t1 QUICK;
1225 REPAIR TABLE federated.t1 EXTENDED;
1226 REPAIR TABLE federated.t1 USE_FRM;
1227 #END optimize and repair tests
1228
1229
1230 # BEGIN ALTER TEST
1231 connection slave;
1232 --disable_warnings
1233 DROP TABLE IF EXISTS federated.normal_table;
1234 --enable_warnings
1235
1236 CREATE TABLE federated.normal_table (
1237 `id` int(4) NOT NULL,
1238 `name` varchar(10) default NULL
1239 ) DEFAULT CHARSET=latin1;
1240
1241 connection master;
1242 --disable_warnings
1243 DROP TABLE IF EXISTS federated.alter_me;
1244 --enable_warnings
1245
1246 --replace_result $SLAVE_MYPORT SLAVE_PORT
1247 eval CREATE TABLE federated.alter_me (
1248 `id` int(4) NOT NULL,
1249 `name` varchar(10) default NULL,
1250 PRIMARY KEY (`id`)
1251 ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1
1252 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/normal_table';
1253
1254 INSERT INTO federated.alter_me (id, name) VALUES (1, 'Monty');
1255 INSERT INTO federated.alter_me (id, name) VALUES (2, 'David');
1256
1257 SELECT * FROM federated.alter_me;
1258
1259 --error ER_ILLEGAL_HA
1260 ALTER TABLE federated.alter_me MODIFY COLUMN id int(16) NOT NULL;
1261
1262 SELECT * FROM federated.alter_me;
1263
1264 DROP TABLE federated.alter_me;
1265 connection slave;
1266 DROP TABLE federated.normal_table;
1267 # END ALTER TEST
1268
1269 #
1270 # Test BUG #14532 - bit columns broken in federated
1271 # storage engine
1272 #
1273 --disable_warnings
1274 DROP TABLE IF EXISTS federated.t1;
1275 --enable_warnings
1276 CREATE TABLE federated.t1 (
1277 `bitty` bit(3)
1278 ) DEFAULT CHARSET=latin1;
1279
1280 connection master;
1281
1282 --disable_warnings
1283 DROP TABLE IF EXISTS federated.t1;
1284 --enable_warnings
1285
1286 --replace_result $SLAVE_MYPORT SLAVE_PORT
1287 eval CREATE TABLE federated.t1 (
1288 `bitty` bit(3)
1289 ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1
1290 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
1291
1292 INSERT INTO federated.t1 VALUES (b'001');
1293 INSERT INTO federated.t1 VALUES (b'010');
1294 INSERT INTO federated.t1 VALUES (b'011');
1295 INSERT INTO federated.t1 VALUES (b'100');
1296 INSERT INTO federated.t1 VALUES (b'101');
1297 INSERT INTO federated.t1 VALUES (b'110');
1298 INSERT INTO federated.t1 VALUES (b'111');
1299 select * FROM federated.t1;
1300 drop table federated.t1;
1301
1302 connection slave;
1303 drop table federated.t1;
1304
1305 #
1306 # BUG# 14768 test auto_increment last_insert_id()
1307 #
1308 connection slave;
1309 DROP TABLE IF EXISTS federated.t1;
1310 CREATE TABLE federated.t1 (
1311 `id` int(20) NOT NULL auto_increment,
1312 PRIMARY KEY (`id`));
1313
1314 connection master;
1315 DROP TABLE IF EXISTS federated.t1;
1316 --replace_result $SLAVE_MYPORT SLAVE_PORT
1317 eval CREATE TABLE federated.t1 (
1318 `id` int(20) NOT NULL auto_increment,
1319 PRIMARY KEY (`id`)
1320 )
1321 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
1322 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
1323
1324 INSERT INTO federated.t1 VALUES ();
1325 SELECT LAST_INSERT_ID();
1326 INSERT INTO federated.t1 VALUES ();
1327 SELECT LAST_INSERT_ID();
1328 INSERT INTO federated.t1 VALUES ();
1329 SELECT LAST_INSERT_ID();
1330 INSERT INTO federated.t1 VALUES ();
1331 SELECT LAST_INSERT_ID();
1332 INSERT INTO federated.t1 VALUES ();
1333 SELECT LAST_INSERT_ID();
1334 SELECT * FROM federated.t1;
1335 DROP TABLE federated.t1;
1336
1337 connection slave;
1338 DROP TABLE federated.t1;
1339
1340 #
1341 # Bug#17377 Federated Engine returns wrong Data, always the rows
1342 # with the highest ID
1343 #
1344
1345 connection slave;
1346
1347 --disable_warnings
1348 DROP TABLE IF EXISTS federated.bug_17377_table;
1349 --enable_warnings
1350
1351 CREATE TABLE federated.bug_17377_table (
1352 `fld_cid` bigint(20) NOT NULL auto_increment,
1353 `fld_name` varchar(255) NOT NULL default '',
1354 `fld_parentid` bigint(20) NOT NULL default '0',
1355 `fld_delt` int(1) NOT NULL default '0',
1356 PRIMARY KEY (`fld_cid`),
1357 KEY `fld_parentid` (`fld_parentid`),
1358 KEY `fld_delt` (`fld_delt`),
1359 KEY `fld_cid` (`fld_cid`)
1360 ) ENGINE=MyISAM;
1361
1362 # Insert some test-data
1363 insert into federated.bug_17377_table( fld_name )
1364 values
1365 ("Mats"), ("Sivert"), ("Sigvard"), ("Torgny"), ("Torkel");
1366
1367 connection master;
1368 --disable_warnings
1369 DROP TABLE IF EXISTS federated.t1;
1370 --enable_warnings
1371
1372 --replace_result $SLAVE_MYPORT SLAVE_PORT
1373 eval CREATE TABLE federated.t1 (
1374 `fld_cid` bigint(20) NOT NULL auto_increment,
1375 `fld_name` varchar(255) NOT NULL default '',
1376 `fld_parentid` bigint(20) NOT NULL default '0',
1377 `fld_delt` int(1) NOT NULL default '0',
1378 PRIMARY KEY (`fld_cid`),
1379 KEY `fld_parentid` (`fld_parentid`),
1380 KEY `fld_delt` (`fld_delt`),
1381 KEY `fld_cid` (`fld_cid`)
1382 ) ENGINE=FEDERATED
1383 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/bug_17377_table';
1384
1385 select * from federated.t1 where fld_parentid=0 and fld_delt=0
1386 order by fld_name;
1387
1388 select * from federated.t1 where fld_parentid=0 and fld_delt=0;
1389
1390 DROP TABLE federated.t1;
1391 connection slave;
1392 DROP TABLE federated.bug_17377_table;
1393
1394 #
1395 # Test multi updates and deletes without keys
1396 #
1397
1398 # The following can be enabled when bug #19773 has been fixed
1399 --disable_parsing
1400 connection slave;
1401 create table federated.t1 (i1 int, i2 int, i3 int);
1402 create table federated.t2 (id int, c1 varchar(20), c2 varchar(20));
1403 connection master;
1404 eval create table federated.t1 (i1 int, i2 int, i3 int) ENGINE=FEDERATED CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
1405 eval create table federated.t2 (id int, c1 varchar(20), c2 varchar(20)) ENGINE=FEDERATED CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t2';
1406 insert into federated.t1 values (1,5,10),(3,7,12),(4,5,2),(9,10,15),(2,2,2);
1407 insert into federated.t2 values (9,"abc","def"),(5,"opq","lmn"),(2,"test t","t test");
1408 select * from federated.t1 order by i1;
1409 select * from federated.t2;
1410 update federated.t1,federated.t2 set t1.i2=15, t2.c2="ppc" where t1.i1=t2.id;
1411 select * from federated.t1 order by i1;
1412 select * from federated.t2 order by id;
1413 delete t1.*,t2.* from federated.t1,federated.t2 where t1.i2=t2.id;
1414 select * from federated.t1 order by i1;
1415 select * from federated.t2 order by id;
1416 drop table federated.t1, federated.t2;
1417 connection slave;
1418 drop table federated.t1, federated.t2;
1419 connection master;
1420
1421 # Test multi updates and deletes with keys
1422
1423 connection slave;
1424 create table federated.t1 (i1 int, i2 int, i3 int, primary key (i1));
1425 create table federated.t2 (id int, c1 varchar(20), c2 varchar(20), primary key (id));
1426 connection master;
1427 eval create table federated.t1 (i1 int auto_increment not null, i2 int, i3 int, primary key (i1)) ENGINE=FEDERATED ENGINE=FEDERATED CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
1428 eval create table federated.t2 (id int auto_increment not null, c1 varchar(20), c2 varchar(20), primary key(id)) ENGINE=FEDERATED ENGINE=FEDERATED CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t2';
1429 insert into federated.t1 values (1,5,10),(3,7,12),(4,5,2),(9,10,15),(2,2,2);
1430 insert into federated.t2 values (9,"abc","def"),(5,"opq","lmn"),(2,"test t","t test");
1431 select * from federated.t1 order by i1;
1432 select * from federated.t2 order by id;
1433 update federated.t1,federated.t2 set t1.i2=15, t2.c2="ppc" where t1.i1=t2.id;
1434 select * from federated.t1 order by i1;
1435 select * from federated.t2 order by id;
1436 delete t1.*,t2.* from federated.t1,federated.t2 where t1.i2=t2.id;
1437 select * from federated.t1 order by i1;
1438 select * from federated.t2 order by id;
1439 drop table federated.t1, federated.t2;
1440 connection slave;
1441 drop table federated.t1, federated.t2;
1442 connection master;
1443 --enable_parsing
1444
1445 #
1446 # BUG #18764: Delete conditions causing inconsistencies in Federated tables
1447 #
1448 connection slave;
1449 --disable_warnings
1450 DROP TABLE IF EXISTS federated.test;
1451 --enable_warnings
1452 CREATE TABLE federated.test (
1453 `id` int(11) NOT NULL,
1454 `val1` varchar(255) NOT NULL,
1455 `val2` varchar(255) NOT NULL,
1456 PRIMARY KEY (`id`)
1457 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
1458
1459 connection master;
1460 --disable_warnings
1461 DROP TABLE IF EXISTS federated.test_local;
1462 DROP TABLE IF EXISTS federated.test_remote;
1463 --enable_warnings
1464 CREATE TABLE federated.test_local (
1465 `id` int(11) NOT NULL,
1466 `val1` varchar(255) NOT NULL,
1467 `val2` varchar(255) NOT NULL,
1468 PRIMARY KEY (`id`)
1469 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
1470
1471 INSERT INTO federated.test_local VALUES (1, 'foo', 'bar'),
1472 (2, 'bar', 'foo');
1473
1474 --replace_result $SLAVE_MYPORT SLAVE_PORT
1475 eval CREATE TABLE federated.test_remote (
1476 `id` int(11) NOT NULL,
1477 `val1` varchar(255) NOT NULL,
1478 `val2` varchar(255) NOT NULL,
1479 PRIMARY KEY (`id`)
1480 ) ENGINE=FEDERATED DEFAULT CHARSET=latin1
1481 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/test';
1482
1483 insert into federated.test_remote select * from federated.test_local;
1484
1485 select * from federated.test_remote;
1486
1487 delete from federated.test_remote where id in (1,2);
1488
1489 insert into federated.test_remote select * from federated.test_local;
1490
1491 select * from federated.test_remote;
1492 --disable_warnings
1493 DROP TABLE federated.test_local;
1494 DROP TABLE federated.test_remote;
1495 --enable_warnings
1496 connection slave;
1497 --disable_warnings
1498 DROP TABLE federated.test;
1499 --enable_warnings
1500
1501 #
1502 # Additional test for bug#18437 "Wrong values inserted with a before
1503 # update trigger on NDB table". SQL-layer didn't properly inform
1504 # handler about fields which were read and set in triggers. In some
1505 # cases this resulted in incorrect (garbage) values of OLD variables
1506 # and lost changes to NEW variables.
1507 # Since for federated engine only operation which is affected by wrong
1508 # fields mark-up is handler::write_row() this file constains coverage
1509 # for ON INSERT triggers only.
1510 #
1511 connection slave;
1512 --disable_warnings
1513 drop table if exists federated.t1;
1514 --enable_warnings
1515 create table federated.t1 (a int, b int, c int);
1516 connection master;
1517 --disable_warnings
1518 drop table if exists federated.t1;
1519 drop table if exists federated.t2;
1520 --enable_warnings
1521 --replace_result $SLAVE_MYPORT SLAVE_PORT
1522 eval create table federated.t1 (a int, b int, c int) engine=federated connection='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
1523 create trigger federated.t1_bi before insert on federated.t1 for each row set new.c= new.a * new.b;
1524 create table federated.t2 (a int, b int);
1525 insert into federated.t2 values (13, 17), (19, 23);
1526 # Each of three statements should correctly set values for all three fields
1527 # insert
1528 insert into federated.t1 (a, b) values (1, 2), (3, 5), (7, 11);
1529 select * from federated.t1 order by a;
1530 delete from federated.t1;
1531 # insert ... select
1532 insert into federated.t1 (a, b) select * from federated.t2;
1533 select * from federated.t1 order by a;
1534 delete from federated.t1;
1535 # load
1536 load data infile '../../std_data/loaddata5.dat' into table federated.t1 fields terminated by '' enclosed by '' ignore 1 lines (a, b);
1537 select * from federated.t1 order by a;
1538 drop tables federated.t1, federated.t2;
1539
1540 connection slave;
1541 drop table federated.t1;
1542
1543 #
1544 # BUG 19773 Crash when using multi-table updates, deletes
1545 # with federated tables
1546 #
1547 connection slave;
1548 create table federated.t1 (i1 int, i2 int, i3 int);
1549 create table federated.t2 (id int, c1 varchar(20), c2 varchar(20));
1550
1551 connection master;
1552 --replace_result $SLAVE_MYPORT SLAVE_PORT
1553 eval create table federated.t1 (i1 int, i2 int, i3 int) ENGINE=FEDERATED CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
1554 --replace_result $SLAVE_MYPORT SLAVE_PORT
1555 eval create table federated.t2 (id int, c1 varchar(20), c2 varchar(20)) ENGINE=FEDERATED CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t2';
1556 insert into federated.t1 values (1,5,10),(3,7,12),(4,5,2),(9,10,15),(2,2,2);
1557 insert into federated.t2 values (9,"abc","def"),(5,"opq","lmn"),(2,"test t","t test");
1558 select * from federated.t1 order by i1;
1559 select * from federated.t2;
1560 update federated.t1,federated.t2 set t1.i2=15, t2.c2="ppc" where t1.i1=t2.id;
1561 select * from federated.t1 order by i1;
1562 select * from federated.t2 order by id;
1563 delete federated.t1.*,federated.t2.* from federated.t1,federated.t2 where t1.i2=t2.id;
1564 select * from federated.t1 order by i1;
1565 select * from federated.t2 order by id;
1566 drop table federated.t1, federated.t2;
1567 connection slave;
1568 drop table federated.t1, federated.t2;
1569
1570 # Test multi updates and deletes with keys
1571 connection slave;
1572 create table federated.t1 (i1 int, i2 int, i3 int, primary key (i1));
1573 create table federated.t2 (id int, c1 varchar(20), c2 varchar(20), primary key (id));
1574
1575 connection master;
1576 --replace_result $SLAVE_MYPORT SLAVE_PORT
1577 eval create table federated.t1 (i1 int auto_increment not null, i2 int, i3 int, primary key (i1)) ENGINE=FEDERATED CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
1578 --replace_result $SLAVE_MYPORT SLAVE_PORT
1579 eval create table federated.t2 (id int auto_increment not null, c1 varchar(20), c2 varchar(20), primary key(id)) ENGINE=FEDERATED CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t2';
1580 insert into federated.t1 values (1,5,10),(3,7,12),(4,5,2),(9,10,15),(2,2,2);
1581 insert into federated.t2 values (9,"abc","def"),(5,"opq","lmn"),(2,"test t","t test");
1582 select * from federated.t1 order by i1;
1583 select * from federated.t2 order by id;
1584 update federated.t1,federated.t2 set t1.i2=15, t2.c2="ppc" where t1.i1=t2.id;
1585 select * from federated.t1 order by i1;
1586 select * from federated.t2 order by id;
1587 delete federated.t1.*,federated.t2.* from federated.t1,federated.t2 where t1.i2=t2.id;
1588 select * from federated.t1 order by i1;
1589 select * from federated.t2 order by id;
1590 drop table federated.t1, federated.t2;
1591
1592 connection slave;
1593 drop table federated.t1, federated.t2;
1594 #
1595 # Bug #16494: Updates that set a column to NULL fail sometimes
1596 #
1597 connection slave;
1598 create table t1 (id int not null auto_increment primary key, val int);
1599 connection master;
1600 --replace_result $SLAVE_MYPORT SLAVE_PORT
1601 eval create table t1
1602 (id int not null auto_increment primary key, val int) engine=federated
1603 connection='mysql://[email protected]:$SLAVE_MYPORT/test/t1';
1604 insert into t1 values (1,0),(2,0);
1605 update t1 set val = NULL where id = 1;
1606 select * from t1;
1607 connection slave;
1608 select * from t1;
1609 drop table t1;
1610 connection master;
1611 drop table t1;
1612
1613 #
1614 # Bug #17608: String literals lost during INSERT query on FEDERATED table
1615 #
1616 connection slave;
1617 create table t1 (a longblob not null);
1618 connection master;
1619 --replace_result $SLAVE_MYPORT SLAVE_PORT
1620 eval create table t1
1621 (a longblob not null) engine=federated
1622 connection='mysql://[email protected]:$SLAVE_MYPORT/test/t1';
1623 insert into t1 values (repeat('a',5000));
1624 select length(a) from t1;
1625 connection slave;
1626 select length(a) from t1;
1627 drop table t1;
1628 connection master;
1629 drop table t1;
1630
1631 #
1632 # BUG #15133: unique index with nullable value not accepted in federated table
1633 #
1634
1635 connection slave;
1636 set sql_mode="";
1637 --disable_warnings
1638 DROP TABLE IF EXISTS federated.test;
1639 CREATE TABLE federated.test (
1640 `i` int(11) NOT NULL,
1641 `j` int(11) NOT NULL,
1642 `c` varchar(30) default NULL,
1643 PRIMARY KEY (`i`,`j`),
1644 UNIQUE KEY `i` (`i`,`c`)
1645 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
1646 --enable_warnings
1647 set sql_mode=default;
1648
1649 connection master;
1650 --disable_warnings
1651 DROP TABLE IF EXISTS federated.test1;
1652 DROP TABLE IF EXISTS federated.test2;
1653 --enable_warnings
1654
1655 --replace_result $SLAVE_MYPORT SLAVE_PORT
1656 eval create table federated.test1 (
1657 i int not null,
1658 j int not null,
1659 c varchar(30),
1660 primary key (i,j),
1661 unique key (i, c))
1662 engine = federated
1663 connection='mysql://[email protected]:$SLAVE_MYPORT/federated/test';
1664
1665 --replace_result $SLAVE_MYPORT SLAVE_PORT
1666 eval create table federated.test2 (
1667 i int default null,
1668 j int not null,
1669 c varchar(30),
1670 key (i))
1671 engine = federated
1672 connection='mysql://[email protected]:$SLAVE_MYPORT/federated/test';
1673 drop table federated.test1, federated.test2;
1674
1675 connection slave;
1676 drop table federated.test;
1677
1678 #
1679 # BUG# 17044 Federated Storage Engine not UTF8 clean
1680 #
1681 connection slave;
1682 set names utf8;
1683 create table federated.t1 (a varchar(64)) DEFAULT CHARSET=utf8;
1684
1685 insert into federated.t1 values (0x6DC3A56E6164);
1686 select hex(a) from federated.t1;
1687
1688 connection master;
1689 --replace_result $SLAVE_MYPORT SLAVE_PORT
1690 eval create table federated.t1 (a varchar(64))
1691 ENGINE=FEDERATED
1692 connection='mysql://[email protected]:$SLAVE_MYPORT/federated/t1'
1693 DEFAULT CHARSET=utf8;
1694 set names utf8;
1695 select hex(a) from federated.t1;
1696 insert into federated.t1 values (0xC3A4C3B6C3BCC39F);
1697 insert into federated.t1 values (0xD18DD184D184D0B5D0BAD182D0B8D0B2D0BDD183D18E);
1698 select hex(a) from federated.t1;
1699
1700 connection slave;
1701 select hex(a) from federated.t1;
1702
1703 connection master;
1704 drop table federated.t1;
1705
1706 connection slave;
1707 drop table federated.t1;
1708
1709 #
1710 # Bug#26909: Specified key was too long; max key length is 255 bytes
1711 # when creating a table
1712 #
1713 connection slave;
1714 CREATE TABLE federated.t1 (
1715 categoryId int(11) NOT NULL AUTO_INCREMENT,
1716 domainId varchar(745) NOT NULL DEFAULT '',
1717 categoryName varchar(255) NOT NULL DEFAULT '',
1718 PRIMARY KEY (categoryId),
1719 UNIQUE KEY idx_unique_category_categoryName (domainId, categoryName),
1720 KEY idx_category_domainId (domainId)
1721 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
1722
1723 connection master;
1724 --replace_result $SLAVE_MYPORT SLAVE_PORT
1725 eval CREATE TABLE federated.t1 (
1726 categoryId int(11) NOT NULL AUTO_INCREMENT,
1727 domainId varchar(745) NOT NULL DEFAULT '',
1728 categoryName varchar(255) NOT NULL DEFAULT '',
1729 PRIMARY KEY (categoryId),
1730 UNIQUE KEY idx_unique_category_categoryName (domainId, categoryName),
1731 KEY idx_category_domainId (domainId)
1732 ) ENGINE=FEDERATED DEFAULT CHARSET=latin1
1733 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
1734
1735
1736 insert into federated.t1 (domainId, categoryName) values ( '1231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231231 300', '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345 250');
1737 insert into federated.t1 (domainId, categoryName) values ( '12312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312312 301', '12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456 250');
1738 insert into federated.t1 (domainId, categoryName) values ('a', 'b');
1739
1740 select categoryId from federated.t1 order by domainId, categoryName;
1741 select categoryId from federated.t1 where domainId='a' and categoryName='b' order by categoryId;
1742 select categoryId from federated.t1 where domainId='a' and categoryName='b' order by categoryId;
1743 select categoryId from federated.t1 where domainId<>'a' and categoryName<>'b' order by categoryId;
1744
1745 drop table federated.t1;
1746
1747 connection slave;
1748 drop table federated.t1;
1749
1750 #
1751 # BUG#21019 Federated Engine does not support REPLACE/INSERT IGNORE/UPDATE IGNORE
1752 #
1753 connection slave;
1754 create table federated.t1 (a int primary key, b varchar(64))
1755 DEFAULT CHARSET=utf8;
1756 connection master;
1757 --replace_result $SLAVE_MYPORT SLAVE_PORT
1758 eval create table federated.t1 (a int primary key, b varchar(64))
1759 ENGINE=FEDERATED
1760 connection='mysql://[email protected]:$SLAVE_MYPORT/federated/t1'
1761 DEFAULT CHARSET=utf8;
1762
1763 insert ignore into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe");
1764 select * from federated.t1;
1765
1766 truncate federated.t1;
1767 replace into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe");
1768 select * from federated.t1;
1769
1770 update ignore federated.t1 set a=a+1;
1771 select * from federated.t1;
1772
1773 drop table federated.t1;
1774 connection slave;
1775 drop table federated.t1;
1776
1777 #
1778 # BUG#25511 Federated Insert failures.
1779 #
1780 # When the user performs a INSERT...ON DUPLICATE KEY UPDATE, we want
1781 # it to fail if a duplicate key exists instead of ignoring it.
1782 #
1783 connection slave;
1784 create table federated.t1 (a int primary key, b varchar(64))
1785 DEFAULT CHARSET=utf8;
1786 connection master;
1787 --replace_result $SLAVE_MYPORT SLAVE_PORT
1788 eval create table federated.t1 (a int primary key, b varchar(64))
1789 ENGINE=FEDERATED
1790 connection='mysql://[email protected]:$SLAVE_MYPORT/federated/t1'
1791 DEFAULT CHARSET=utf8;
1792
1793 --error ER_DUP_KEY
1794 insert into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe")
1795 on duplicate key update a=a+100;
1796 select * from federated.t1;
1797
1798 drop table federated.t1;
1799 connection slave;
1800 drop table federated.t1;
1801
1802 --echo
1803 --echo Bug#18287 create federated table always times out, error 1159 ' '
1804 --echo
1805 --echo Test that self-references work
1806 --echo
1807 --echo fix LOCK_open before reenabling test for Bug#18287
1808 --disable_parsing
1809 connection slave;
1810 create table federated.t1 (a int primary key);
1811 --replace_result $SLAVE_MYPORT SLAVE_PORT
1812 eval create table federated.t2 (a int primary key)
1813 ENGINE=FEDERATED
1814 connection='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
1815 insert into federated.t1 (a) values (1);
1816 select * from federated.t2;
1817 drop table federated.t1, federated.t2;
1818 --enable_parsing
1819 #
1820 # BUG#29875 Disable support for transactions
1821 #
1822 connection slave;
1823 CREATE TABLE federated.t1 (a INT PRIMARY KEY) DEFAULT CHARSET=utf8;
1824 connection master;
1825 --replace_result $SLAVE_MYPORT SLAVE_PORT
1826 eval CREATE TABLE federated.t1 (a INT PRIMARY KEY)
1827 ENGINE=FEDERATED
1828 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1'
1829 DEFAULT CHARSET=utf8;
1830
1831 SELECT transactions FROM information_schema.engines WHERE engine="FEDERATED";
1832 INSERT INTO federated.t1 VALUES (1);
1833 SET autocommit=0;
1834 INSERT INTO federated.t1 VALUES (2);
1835 ROLLBACK;
1836 SET autocommit=1;
1837 SELECT * FROM federated.t1;
1838
1839 DROP TABLE federated.t1;
1840 connection slave;
1841 DROP TABLE federated.t1;
1842
1843 #
1844 # Bug #32374 crash with filesort when selecting from federated table and view
1845 #
1846 connection slave;
1847 create table t1 (a varchar(256));
1848 --disable_warnings
1849 drop view if exists v1;
1850 --enable_warnings
1851 create view v1 as select a from t1;
1852 --disable_query_log
1853 let $n= 100;
1854 while ($n)
1855 {
1856 insert into t1 values (repeat('a',200));
1857 dec $n;
1858 }
1859 --enable_query_log
1860
1861 connection master;
1862 --replace_result $SLAVE_MYPORT SLAVE_PORT
1863 eval create table t1
1864 (a varchar(256)) engine=federated
1865 connection='mysql://[email protected]:$SLAVE_MYPORT/test/v1';
1866
1867 select 1 from t1 order by a;
1868 drop table t1;
1869 connection slave;
1870 drop table t1;
1871 drop view v1;
1872
1873 #
1874 # BUG#33946 - Join on Federated tables with Unique index gives error 1430
1875 # from storage engine
1876 #
1877 connection slave;
1878 CREATE TABLE t1 (a INT, b INT, KEY(a,b));
1879 INSERT INTO t1 VALUES(NULL,1),(1,NULL),(NULL,NULL),(1,1),(2,2);
1880
1881 connection master;
1882 --replace_result $SLAVE_MYPORT SLAVE_PORT
1883 eval CREATE TABLE t1 (a INT, b INT, KEY(a,b)) ENGINE=federated
1884 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/test/t1';
1885 SELECT * FROM t1 WHERE a IS NULL;
1886 SELECT * FROM t1 WHERE a IS NOT NULL;
1887 SELECT * FROM t1 WHERE a=1 AND b=1;
1888 SELECT * FROM t1 WHERE a IS NULL AND b=1;
1889 SELECT * FROM t1 WHERE a IS NOT NULL AND b=1;
1890 DROP TABLE t1;
1891
1892 connection slave;
1893 DROP TABLE t1;
1894
1895 #
1896 # BUG#34788 - malformed federated connection url is not handled correctly -
1897 # crashes server !
1898 #
1899 # also tests
1900 #
1901 # BUG#35509 - Federated leaks memory when connecting to localhost/default
1902 # port
1903 #
1904 CREATE TABLE t1 (a INT) ENGINE=federated CONNECTION='mysql://@:://';
1905 DROP TABLE t1;
1906
1907
1908 #
1909 # Bug #34779: crash in checksum table on federated tables with blobs
1910 # containing nulls
1911 #
1912 connection slave;
1913 CREATE TABLE t1 (a LONGBLOB, b LONGBLOB);
1914 INSERT INTO t1 VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaa', NULL);
1915 connection master;
1916 --replace_result $SLAVE_MYPORT SLAVE_PORT
1917 eval CREATE TABLE t1
1918 (a LONGBLOB, b LONGBLOB) ENGINE=FEDERATED
1919 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/test/t1';
1920 CHECKSUM TABLE t1;
1921 connection slave;
1922 DROP TABLE t1;
1923 connection master;
1924 DROP TABLE t1;
1925
1926
1927 #
1928 # Bug #34774 key prefix on text field in federated tables can cause
1929 # server to crash!
1930 #
1931 connection slave;
1932 CREATE TABLE t1 (a TEXT, b TEXT, KEY(b(1)));
1933 INSERT INTO t1 VALUES (NULL, NULL), (NULL, NULL), (NULL, NULL), (NULL, NULL);
1934 connection master;
1935 --replace_result $SLAVE_MYPORT SLAVE_PORT
1936 eval CREATE TABLE t1
1937 (a TEXT, b TEXT, KEY(b(1))) ENGINE=FEDERATED
1938 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/test/t1';
1939 SELECT t1.a FROM t1, t1 as t2 WHERE t2.b NOT LIKE t1.b;
1940 connection slave;
1941 DROP TABLE t1;
1942 connection master;
1943 DROP TABLE t1;
1944
1945 --echo #
1946 --echo # BUG#21360 - mysqldump error on federated tables
1947 --echo #
1948 connection slave;
1949 --echo #Switch to Connection Slave
1950 CREATE TABLE t1(id VARCHAR(20) NOT NULL, PRIMARY KEY(id));
1951 INSERT INTO t1 VALUES ('text1'),('text2'),('text3'),('text4');
1952
1953 connection master;
1954 --echo #Switch to Connection Master
1955 --replace_result $SLAVE_MYPORT SLAVE_PORT
1956 eval CREATE TABLE t1(id VARCHAR(20) NOT NULL, PRIMARY KEY(id)) ENGINE=FEDERATED
1957 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/test/t1';
1958 --echo # Dump table t1 using mysqldump tool
1959 --replace_result $SLAVE_MYPORT SLAVE_PORT
1960 --exec $MYSQL_DUMP --compact test t1
1961 DROP TABLE t1;
1962
1963 connection slave;
1964 --echo #Switch to Connection Slave
1965 DROP TABLE t1;
1966
1967 connection default;
1968
1969 --echo End of 5.0 tests
1970
1971 create server 's1' foreign data wrapper 'mysql' options (host 'foo');
1972 drop server 's1';
1973
1974
1975 --echo #
1976 --echo # Bug #32426: FEDERATED query returns corrupt results for ORDER BY on a TEXT
1977 --echo #
1978 connection slave;
1979 CREATE TABLE federated.t1(a TEXT);
1980 INSERT INTO federated.t1 VALUES('abc'), ('gh'), ('f'), ('ijk'), ('de');
1981
1982 connection master;
1983 --replace_result $SLAVE_MYPORT SLAVE_PORT
1984 eval CREATE TABLE federated.t1(a TEXT) ENGINE=FEDERATED
1985 CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/federated/t1';
1986 # MBug#571200: Need to port fix for MySQL Bug#32426 and re-enable this test.
1987 #SELECT * FROM federated.t1 ORDER BY A;
1988 #SELECT * FROM federated.t1 ORDER BY A DESC;
1989 DROP TABLE federated.t1;
1990
1991 connection slave;
1992 DROP TABLE federated.t1;
1993
1994 connection default;
1995
1996
1997 --echo End of 5.1 tests
1998 SET @@GLOBAL.CONCURRENT_INSERT= @OLD_MASTER_CONCURRENT_INSERT;
1999 connection slave;
2000 SET @@GLOBAL.CONCURRENT_INSERT= @OLD_SLAVE_CONCURRENT_INSERT;
2001
2002 connection default;
2003
2004 --echo #
2005 --echo # MDEV-9346 - The federatedx and spider engine make mysqld crash when
2006 --echo # they are configured withtout username
2007 --echo #
2008 connection master;
2009 --replace_result $SLAVE_MYPORT SLAVE_PORT
2010 --error ER_CANT_CREATE_FEDERATED_TABLE
2011 eval CREATE TABLE t1 (a INT) ENGINE=FEDERATED CONNECTION='mysql://@127.0.0.1:$SLAVE_MYPORT/federated/t1';
2012
2013 --echo #
2014 --echo # MDEV-17573 Assertion in federatedx on multi-update
2015 --echo #
2016 create table t1 (
2017 x int,
2018 d datetime);
2019 --replace_result $MASTER_MYPORT MASTER_MYPORT
2020 eval create table t1f engine=FEDERATED connection='mysql://[email protected]:$MASTER_MYPORT/test/t1';
2021
2022 create table t2 (
2023 x int, y int,
2024 d datetime);
2025 --replace_result $MASTER_MYPORT MASTER_MYPORT
2026 eval create table t2f engine=FEDERATED connection='mysql://[email protected]:$MASTER_MYPORT/test/t2';
2027
2028 create table t3 (
2029 x int, y int, z int,
2030 d datetime);
2031 --replace_result $MASTER_MYPORT MASTER_MYPORT
2032 eval create table t3f engine=FEDERATED connection='mysql://[email protected]:$MASTER_MYPORT/test/t3';
2033
2034 insert into t1 values (1, "1990-01-01 00:00");
2035 insert into t1 values (1, "1991-01-01 11:11");
2036 insert into t2 values (2, 2, "1992-02-02 22:22");
2037 insert into t3 values (3, 3, 3, "1993-03-03 23:33");
2038 update t1f, t2f, t3f set t1f.x= 11, t2f.y= 22, t3f.z= 33;
2039
2040 drop table t1f; drop table t2f; drop table t3f; drop table t1; drop table t2; drop table t3;
2041
2042 --echo #
2043 --echo # MDEV-21049 Segfault in create federatedx table with empty hostname
2044 --echo #
2045 connection master;
2046 --replace_result $SLAVE_MYPORT SLAVE_PORT
2047 --error ER_CANT_CREATE_FEDERATED_TABLE
2048 eval CREATE TABLE federated.t1 (x int) ENGINE=FEDERATED
2049 CONNECTION='mysql://root@:$SLAVE_MYPORT/federated/t1';
2050
2051 connection slave;
2052 CREATE TABLE federated.t1(x int);
2053 connection master;
2054 --replace_result $SLAVE_MYPORT SLAVE_PORT
2055 eval CREATE TABLE federated.t1 (x int) ENGINE=FEDERATED
2056 CONNECTION='mysql://root@:$SLAVE_MYPORT/federated/t1';
2057
2058 DROP TABLE federated.t1;
2059 connection slave;
2060 DROP TABLE federated.t1;
2061 connection default;
2062
2063 --echo #
2064 --echo # MDEV-30395 Wrong result with semijoin and Federated as outer table
2065 --echo #
2066
2067
2068 --replace_result $MASTER_MYPORT MASTER_PORT
2069 eval create server s foreign data wrapper mysql options (host "127.0.0.1", database "test", user "root", port $MASTER_MYPORT);
2070
2071 CREATE TABLE t1 (a INT);
2072 INSERT INTO t1 VALUES (3),(2),(3);
2073 CREATE TABLE t2 (pk INT PRIMARY KEY);
2074 INSERT INTO t2 VALUES (1),(2),(3),(4);
2075
2076 set @save_optimizer_switch=@@optimizer_switch;
2077 set optimizer_switch="materialization=off";
2078
2079 CREATE TABLE t2_fed ENGINE=FEDERATED CONNECTION='s/t2';
2080 explain SELECT * FROM t2_fed WHERE pk IN ( SELECT a FROM t1 );
2081 SELECT * FROM t2_fed WHERE pk IN ( SELECT a FROM t1 );
2082 SET optimizer_switch='semijoin=off';
2083 explain SELECT * FROM t2_fed WHERE pk IN ( SELECT a FROM t1 );
2084 SELECT * FROM t2_fed WHERE pk IN ( SELECT a FROM t1 );
2085
2086 DROP TABLE t2_fed, t1, t2;
2087 set @@optimizer_switch=@save_optimizer_switch;
2088
2089 DROP SERVER s;
2090
2091 --echo # End of 10.5 tests
2092
2093 --echo #
2094 --echo # MDEV-30569: Assertion ...ha_table_flags() failed in Duplicate_weedout_picker::check_qep
2095 --echo #
2096
2097 evalp create server s foreign data wrapper mysql options
2098 (host "127.0.0.1", database "test", user "root", port $MASTER_MYPORT);
2099
2100 CREATE TABLE t1 (a INT);
2101 INSERT INTO t1 VALUES (1),(2);
2102
2103 CREATE TABLE t2 (b INT);
2104 INSERT INTO t2 VALUES (3),(4);
2105
2106 CREATE TABLE t1_fed ENGINE=FEDERATED CONNECTION='s/t1';
2107 CREATE VIEW v AS SELECT * FROM t1_fed;
2108
2109 SELECT * FROM v WHERE a IN ( SELECT b FROM t2);
2110
2111 DROP VIEW v;
2112 DROP TABLE t1_fed, t1, t2;
2113 DROP SERVER s;
2114
2115 --echo # End of 11.0 tests
2116
2117 --echo #
2118 --echo # MDEV-35184 Corruption errors upon creation or usage of Federated table with vector key
2119 --echo #
2120 evalp create server s foreign data wrapper mysql options (host "127.0.0.1", database "test", user "root", port $MASTER_MYPORT);
2121 create table t1 (a vector(1) not null, vector(a));
2122 --error ER_ILLEGAL_HA_CREATE_OPTION
2123 create table t1_fed1 engine=federated connection = 's/t1';
2124 --error ER_ILLEGAL_HA_CREATE_OPTION
2125 create table t1_fed2 (a vector(1) not null, vector(a)) engine=federated connection = 's/t1';
2126 drop table t1;
2127 drop server s;
2128
2129 --echo # End of 11.8 tests
2130
2131 source include/federated_cleanup.inc;