1
drop table if exists `T1`;
2
drop table if exists `T2`;
3
drop table if exists `T3`;
4
drop table if exists `T4`;
5
drop table if exists `T5`;
6
drop table if exists `T6`;
7
drop table if exists `T7`;
8
drop table if exists `T8`;
9
drop table if exists `T9`;
10
drop table if exists `T10`;
11
drop table if exists `T11`;
12
drop table if exists `T12`;
14
SET character_set_database = utf8;
15
CREATE TABLE `T1a` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
16
CREATE TABLE `T1b` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
17
CREATE TABLE `T2a` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
18
CREATE TABLE `T2b` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
19
CREATE TABLE `T3a` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
20
CREATE TABLE `T3b` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
21
CREATE TABLE `T4a` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
22
CREATE TABLE `T4b` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
23
CREATE TABLE `T5a` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
24
CREATE TABLE `T5b` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
25
CREATE TABLE `T6a` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
26
CREATE TABLE `T6b` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
27
CREATE TABLE `T7a` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
28
CREATE TABLE `T7b` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
29
CREATE TABLE `T8a` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
30
CREATE TABLE `T8b` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
31
CREATE TABLE `T9a` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
32
CREATE TABLE `T9b` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
33
CREATE TABLE `T10a` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
34
CREATE TABLE `T10b` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
35
CREATE TABLE `T11a` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
36
CREATE TABLE `T11b` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
37
CREATE TABLE `T12a` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
38
CREATE TABLE `T12b` (`C1` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
39
INSERT INTO `T1a` VALUES ('ア'),('カ'),('サ');
40
INSERT INTO `T1b` VALUES ('ア');
41
INSERT INTO `T2a` VALUES ('あ'),('か'),('さ');
42
INSERT INTO `T2b` VALUES ('あ');
43
INSERT INTO `T3a` VALUES ('龔'),('龖'),('龗');
44
INSERT INTO `T3b` VALUES ('龔');
45
INSERT INTO `T4a` VALUES ('ア'),('カ'),('サ');
46
INSERT INTO `T4b` VALUES ('ア');
47
INSERT INTO `T5a` VALUES ('あ'),('か'),('さ');
48
INSERT INTO `T5b` VALUES ('あ');
49
INSERT INTO `T6a` VALUES ('龔'),('龖'),('龗');
50
INSERT INTO `T6b` VALUES ('龔');
51
INSERT INTO `T7a` VALUES ('ア'),('カ'),('サ');
52
INSERT INTO `T7b` VALUES ('ア');
53
INSERT INTO `T8a` VALUES ('あ'),('か'),('さ');
54
INSERT INTO `T8b` VALUES ('あ');
55
INSERT INTO `T9a` VALUES ('龔'),('龖'),('龗');
56
INSERT INTO `T9b` VALUES ('龔');
57
INSERT INTO `T10a` VALUES ('ア'),('カ'),('サ');
58
INSERT INTO `T10b` VALUES ('ア');
59
INSERT INTO `T11a` VALUES ('あ'),('か'),('さ');
60
INSERT INTO `T11b` VALUES ('あ');
61
INSERT INTO `T12a` VALUES ('龔'),('龖'),('龗');
62
INSERT INTO `T12b` VALUES ('龔');
63
SELECT * FROM `T1a` JOIN `T1b`;
68
SELECT * FROM `T1a` INNER JOIN `T1b`;
73
SELECT * FROM `T1a` JOIN `T1b` USING (`C1`);
76
SELECT * FROM `T1a` INNER JOIN `T1b` USING (`C1`);
79
SELECT * FROM `T1a` CROSS JOIN `T1b`;
84
SELECT * FROM `T1a` LEFT JOIN `T1b` USING (`C1`);
89
SELECT * FROM `T1a` LEFT JOIN `T1b` ON (`T1a`.`C1` = `T1b`.`C1`);
94
SELECT * FROM `T1b` RIGHT JOIN `T1a` USING (`C1`);
99
SELECT * FROM `T1b` RIGHT JOIN `T1a` ON (`T1a`.`C1` = `T1b`.`C1`);
104
SELECT * FROM `T2a` JOIN `T2b`;
109
SELECT * FROM `T2a` INNER JOIN `T2b`;
114
SELECT * FROM `T2a` JOIN `T2b` USING (`C1`);
117
SELECT * FROM `T2a` INNER JOIN `T2b` USING (`C1`);
120
SELECT * FROM `T2a` CROSS JOIN `T2b`;
125
SELECT * FROM `T2a` LEFT JOIN `T2b` USING (`C1`);
130
SELECT * FROM `T2a` LEFT JOIN `T2b` ON (`T2a`.`C1` = `T2b`.`C1`);
135
SELECT * FROM `T2b` RIGHT JOIN `T2a` USING (`C1`);
140
SELECT * FROM `T2b` RIGHT JOIN `T2a` ON (`T2a`.`C1` = `T2b`.`C1`);
145
SELECT * FROM `T3a` JOIN `T3b`;
150
SELECT * FROM `T3a` INNER JOIN `T3b`;
155
SELECT * FROM `T3a` JOIN `T3b` USING (`C1`);
158
SELECT * FROM `T3a` INNER JOIN `T3b` USING (`C1`);
161
SELECT * FROM `T3a` CROSS JOIN `T3b`;
166
SELECT * FROM `T3a` LEFT JOIN `T3b` USING (`C1`);
171
SELECT * FROM `T3a` LEFT JOIN `T3b` ON (`T3a`.`C1` = `T3b`.`C1`);
176
SELECT * FROM `T3b` RIGHT JOIN `T3a` USING (`C1`);
181
SELECT * FROM `T3b` RIGHT JOIN `T3a` ON (`T3a`.`C1` = `T3b`.`C1`);
186
SELECT * FROM `T4a` JOIN `T4b`;
191
SELECT * FROM `T4a` INNER JOIN `T4b`;
196
SELECT * FROM `T4a` JOIN `T4b` USING (`C1`);
199
SELECT * FROM `T4a` INNER JOIN `T4b` USING (`C1`);
202
SELECT * FROM `T4a` CROSS JOIN `T4b`;
207
SELECT * FROM `T4a` LEFT JOIN `T4b` USING (`C1`);
212
SELECT * FROM `T4a` LEFT JOIN `T4b` ON (`T4a`.`C1` = `T4b`.`C1`);
217
SELECT * FROM `T4b` RIGHT JOIN `T4a` USING (`C1`);
222
SELECT * FROM `T4b` RIGHT JOIN `T4a` ON (`T4a`.`C1` = `T4b`.`C1`);
227
SELECT * FROM `T5a` JOIN `T5b`;
232
SELECT * FROM `T5a` INNER JOIN `T5b`;
237
SELECT * FROM `T5a` JOIN `T5b` USING (`C1`);
240
SELECT * FROM `T5a` INNER JOIN `T5b` USING (`C1`);
243
SELECT * FROM `T5a` CROSS JOIN `T5b`;
248
SELECT * FROM `T5a` LEFT JOIN `T5b` USING (`C1`);
253
SELECT * FROM `T5a` LEFT JOIN `T5b` ON (`T5a`.`C1` = `T5b`.`C1`);
258
SELECT * FROM `T5b` RIGHT JOIN `T5a` USING (`C1`);
263
SELECT * FROM `T5b` RIGHT JOIN `T5a` ON (`T5a`.`C1` = `T5b`.`C1`);
268
SELECT * FROM `T6a` JOIN `T6b`;
273
SELECT * FROM `T6a` INNER JOIN `T6b`;
278
SELECT * FROM `T6a` JOIN `T6b` USING (`C1`);
281
SELECT * FROM `T6a` INNER JOIN `T6b` USING (`C1`);
284
SELECT * FROM `T6a` CROSS JOIN `T6b`;
289
SELECT * FROM `T6a` LEFT JOIN `T6b` USING (`C1`);
294
SELECT * FROM `T6a` LEFT JOIN `T6b` ON (`T6a`.`C1` = `T6b`.`C1`);
299
SELECT * FROM `T6b` RIGHT JOIN `T6a` USING (`C1`);
304
SELECT * FROM `T6b` RIGHT JOIN `T6a` ON (`T6a`.`C1` = `T6b`.`C1`);
309
SELECT * FROM `T7a` JOIN `T7b`;
314
SELECT * FROM `T7a` INNER JOIN `T7b`;
319
SELECT * FROM `T7a` JOIN `T7b` USING (`C1`);
322
SELECT * FROM `T7a` INNER JOIN `T7b` USING (`C1`);
325
SELECT * FROM `T7a` CROSS JOIN `T7b`;
330
SELECT * FROM `T7a` LEFT JOIN `T7b` USING (`C1`);
335
SELECT * FROM `T7a` LEFT JOIN `T7b` ON (`T7a`.`C1` = `T7b`.`C1`);
340
SELECT * FROM `T7b` RIGHT JOIN `T7a` USING (`C1`);
345
SELECT * FROM `T7b` RIGHT JOIN `T7a` ON (`T7a`.`C1` = `T7b`.`C1`);
350
SELECT * FROM `T8a` JOIN `T8b`;
355
SELECT * FROM `T8a` INNER JOIN `T8b`;
360
SELECT * FROM `T8a` JOIN `T8b` USING (`C1`);
363
SELECT * FROM `T8a` INNER JOIN `T8b` USING (`C1`);
366
SELECT * FROM `T8a` CROSS JOIN `T8b`;
371
SELECT * FROM `T8a` LEFT JOIN `T8b` USING (`C1`);
376
SELECT * FROM `T8a` LEFT JOIN `T8b` ON (`T8a`.`C1` = `T8b`.`C1`);
381
SELECT * FROM `T8b` RIGHT JOIN `T8a` USING (`C1`);
386
SELECT * FROM `T8b` RIGHT JOIN `T8a` ON (`T8a`.`C1` = `T8b`.`C1`);
391
SELECT * FROM `T9a` JOIN `T9b`;
396
SELECT * FROM `T9a` INNER JOIN `T9b`;
401
SELECT * FROM `T9a` JOIN `T9b` USING (`C1`);
404
SELECT * FROM `T9a` INNER JOIN `T9b` USING (`C1`);
407
SELECT * FROM `T9a` CROSS JOIN `T9b`;
412
SELECT * FROM `T9a` LEFT JOIN `T9b` USING (`C1`);
417
SELECT * FROM `T9a` LEFT JOIN `T9b` ON (`T9a`.`C1` = `T9b`.`C1`);
422
SELECT * FROM `T9b` RIGHT JOIN `T9a` USING (`C1`);
427
SELECT * FROM `T9b` RIGHT JOIN `T9a` ON (`T9a`.`C1` = `T9b`.`C1`);
432
SELECT * FROM `T10a` JOIN `T10b`;
437
SELECT * FROM `T10a` INNER JOIN `T10b`;
442
SELECT * FROM `T10a` JOIN `T10b` USING (`C1`);
445
SELECT * FROM `T10a` INNER JOIN `T10b` USING (`C1`);
448
SELECT * FROM `T10a` CROSS JOIN `T10b`;
453
SELECT * FROM `T10a` LEFT JOIN `T10b` USING (`C1`);
458
SELECT * FROM `T10a` LEFT JOIN `T10b` ON (`T10a`.`C1` = `T10b`.`C1`);
463
SELECT * FROM `T10b` RIGHT JOIN `T10a` USING (`C1`);
468
SELECT * FROM `T10b` RIGHT JOIN `T10a` ON (`T10a`.`C1` = `T10b`.`C1`);
473
SELECT * FROM `T11a` JOIN `T11b`;
478
SELECT * FROM `T11a` INNER JOIN `T11b`;
483
SELECT * FROM `T11a` JOIN `T11b` USING (`C1`);
486
SELECT * FROM `T11a` INNER JOIN `T11b` USING (`C1`);
489
SELECT * FROM `T11a` CROSS JOIN `T11b`;
494
SELECT * FROM `T11a` LEFT JOIN `T11b` USING (`C1`);
499
SELECT * FROM `T11a` LEFT JOIN `T11b` ON (`T11a`.`C1` = `T11b`.`C1`);
504
SELECT * FROM `T11b` RIGHT JOIN `T11a` USING (`C1`);
509
SELECT * FROM `T11b` RIGHT JOIN `T11a` ON (`T11a`.`C1` = `T11b`.`C1`);
514
SELECT * FROM `T12a` JOIN `T12b`;
519
SELECT * FROM `T12a` INNER JOIN `T12b`;
524
SELECT * FROM `T12a` JOIN `T12b` USING (`C1`);
527
SELECT * FROM `T12a` INNER JOIN `T12b` USING (`C1`);
530
SELECT * FROM `T12a` CROSS JOIN `T12b`;
535
SELECT * FROM `T12a` LEFT JOIN `T12b` USING (`C1`);
540
SELECT * FROM `T12a` LEFT JOIN `T12b` ON (`T12a`.`C1` = `T12b`.`C1`);
545
SELECT * FROM `T12b` RIGHT JOIN `T12a` USING (`C1`);
550
SELECT * FROM `T12b` RIGHT JOIN `T12a` ON (`T12a`.`C1` = `T12b`.`C1`);