mariadb/mysql-test/suite/jp/t/jp_join_utf8.test

218 lines
11 KiB
Text
Raw Normal View History

--disable_warnings
drop table if exists ``;
drop table if exists ``;
drop table if exists ``;
drop table if exists ``;
drop table if exists ``;
drop table if exists ``;
drop table if exists ``;
drop table if exists ``;
drop table if exists ``;
drop table if exists ``;
drop table if exists ``;
drop table if exists ``;
--enable_warnings
#
# Test table JOIN using Japanese characters in utf8
#
SET NAMES utf8;
SET character_set_database = utf8;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `a` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `b` (`` char(1) PRIMARY KEY) DEFAULT CHARSET = utf8 engine = innodb;
#insert the following data in each table
# jisx0201 hankaku-katakana data
# jisx0208 data
# jisx0212 supplemental character data
INSERT INTO `a` VALUES ('ア'),('カ'),('サ');
INSERT INTO `b` VALUES ('ア');
INSERT INTO `a` VALUES ('あ'),('か'),('さ');
INSERT INTO `b` VALUES ('あ');
INSERT INTO `a` VALUES ('龔'),('龖'),('龗');
INSERT INTO `b` VALUES ('龔');
INSERT INTO `a` VALUES ('ア'),('カ'),('サ');
INSERT INTO `b` VALUES ('ア');
INSERT INTO `a` VALUES ('あ'),('か'),('さ');
INSERT INTO `b` VALUES ('あ');
INSERT INTO `a` VALUES ('龔'),('龖'),('龗');
INSERT INTO `b` VALUES ('龔');
INSERT INTO `a` VALUES ('ア'),('カ'),('サ');
INSERT INTO `b` VALUES ('ア');
INSERT INTO `a` VALUES ('あ'),('か'),('さ');
INSERT INTO `b` VALUES ('あ');
INSERT INTO `a` VALUES ('龔'),('龖'),('龗');
INSERT INTO `b` VALUES ('龔');
INSERT INTO `a` VALUES ('ア'),('カ'),('サ');
INSERT INTO `b` VALUES ('ア');
INSERT INTO `a` VALUES ('あ'),('か'),('さ');
INSERT INTO `b` VALUES ('あ');
INSERT INTO `a` VALUES ('龔'),('龖'),('龗');
INSERT INTO `b` VALUES ('龔');
#Test for innodb
SELECT * FROM `a` JOIN `b`;
SELECT * FROM `a` INNER JOIN `b`;
SELECT * FROM `a` JOIN `b` USING (``);
SELECT * FROM `a` INNER JOIN `b` USING (``);
SELECT * FROM `a` CROSS JOIN `b`;
SELECT * FROM `a` LEFT JOIN `b` USING (``);
SELECT * FROM `a` LEFT JOIN `b` ON (`a`.`` = `b`.``);
SELECT * FROM `b` RIGHT JOIN `a` USING (``);
SELECT * FROM `b` RIGHT JOIN `a` ON (`a`.`` = `b`.``);
SELECT * FROM `a` JOIN `b`;
SELECT * FROM `a` INNER JOIN `b`;
SELECT * FROM `a` JOIN `b` USING (``);
SELECT * FROM `a` INNER JOIN `b` USING (``);
SELECT * FROM `a` CROSS JOIN `b`;
SELECT * FROM `a` LEFT JOIN `b` USING (``);
SELECT * FROM `a` LEFT JOIN `b` ON (`a`.`` = `b`.``);
SELECT * FROM `b` RIGHT JOIN `a` USING (``);
SELECT * FROM `b` RIGHT JOIN `a` ON (`a`.`` = `b`.``);
SELECT * FROM `a` JOIN `b`;
SELECT * FROM `a` INNER JOIN `b`;
SELECT * FROM `a` JOIN `b` USING (``);
SELECT * FROM `a` INNER JOIN `b` USING (``);
SELECT * FROM `a` CROSS JOIN `b`;
SELECT * FROM `a` LEFT JOIN `b` USING (``);
SELECT * FROM `a` LEFT JOIN `b` ON (`a`.`` = `b`.``);
SELECT * FROM `b` RIGHT JOIN `a` USING (``);
SELECT * FROM `b` RIGHT JOIN `a` ON (`a`.`` = `b`.``);
#Test for myisam
SELECT * FROM `a` JOIN `b`;
SELECT * FROM `a` INNER JOIN `b`;
SELECT * FROM `a` JOIN `b` USING (``);
SELECT * FROM `a` INNER JOIN `b` USING (``);
SELECT * FROM `a` CROSS JOIN `b`;
SELECT * FROM `a` LEFT JOIN `b` USING (``);
SELECT * FROM `a` LEFT JOIN `b` ON (`a`.`` = `b`.``);
SELECT * FROM `b` RIGHT JOIN `a` USING (``);
SELECT * FROM `b` RIGHT JOIN `a` ON (`a`.`` = `b`.``);
SELECT * FROM `a` JOIN `b`;
SELECT * FROM `a` INNER JOIN `b`;
SELECT * FROM `a` JOIN `b` USING (``);
SELECT * FROM `a` INNER JOIN `b` USING (``);
SELECT * FROM `a` CROSS JOIN `b`;
SELECT * FROM `a` LEFT JOIN `b` USING (``);
SELECT * FROM `a` LEFT JOIN `b` ON (`a`.`` = `b`.``);
SELECT * FROM `b` RIGHT JOIN `a` USING (``);
SELECT * FROM `b` RIGHT JOIN `a` ON (`a`.`` = `b`.``);
SELECT * FROM `a` JOIN `b`;
SELECT * FROM `a` INNER JOIN `b`;
SELECT * FROM `a` JOIN `b` USING (``);
SELECT * FROM `a` INNER JOIN `b` USING (``);
SELECT * FROM `a` CROSS JOIN `b`;
SELECT * FROM `a` LEFT JOIN `b` USING (``);
SELECT * FROM `a` LEFT JOIN `b` ON (`a`.`` = `b`.``);
SELECT * FROM `b` RIGHT JOIN `a` USING (``);
SELECT * FROM `b` RIGHT JOIN `a` ON (`a`.`` = `b`.``);
#Test for heap
SELECT * FROM `a` JOIN `b`;
SELECT * FROM `a` INNER JOIN `b`;
SELECT * FROM `a` JOIN `b` USING (``);
SELECT * FROM `a` INNER JOIN `b` USING (``);
SELECT * FROM `a` CROSS JOIN `b`;
SELECT * FROM `a` LEFT JOIN `b` USING (``);
SELECT * FROM `a` LEFT JOIN `b` ON (`a`.`` = `b`.``);
SELECT * FROM `b` RIGHT JOIN `a` USING (``);
SELECT * FROM `b` RIGHT JOIN `a` ON (`a`.`` = `b`.``);
SELECT * FROM `a` JOIN `b`;
SELECT * FROM `a` INNER JOIN `b`;
SELECT * FROM `a` JOIN `b` USING (``);
SELECT * FROM `a` INNER JOIN `b` USING (``);
SELECT * FROM `a` CROSS JOIN `b`;
SELECT * FROM `a` LEFT JOIN `b` USING (``);
SELECT * FROM `a` LEFT JOIN `b` ON (`a`.`` = `b`.``);
SELECT * FROM `b` RIGHT JOIN `a` USING (``);
SELECT * FROM `b` RIGHT JOIN `a` ON (`a`.`` = `b`.``);
SELECT * FROM `a` JOIN `b`;
SELECT * FROM `a` INNER JOIN `b`;
SELECT * FROM `a` JOIN `b` USING (``);
SELECT * FROM `a` INNER JOIN `b` USING (``);
SELECT * FROM `a` CROSS JOIN `b`;
SELECT * FROM `a` LEFT JOIN `b` USING (``);
SELECT * FROM `a` LEFT JOIN `b` ON (`a`.`` = `b`.``);
SELECT * FROM `b` RIGHT JOIN `a` USING (``);
SELECT * FROM `b` RIGHT JOIN `a` ON (`a`.`` = `b`.``);
#Test for heap
SELECT * FROM `a` JOIN `b`;
SELECT * FROM `a` INNER JOIN `b`;
SELECT * FROM `a` JOIN `b` USING (``);
SELECT * FROM `a` INNER JOIN `b` USING (``);
SELECT * FROM `a` CROSS JOIN `b`;
SELECT * FROM `a` LEFT JOIN `b` USING (``);
SELECT * FROM `a` LEFT JOIN `b` ON (`a`.`` = `b`.``);
SELECT * FROM `b` RIGHT JOIN `a` USING (``);
SELECT * FROM `b` RIGHT JOIN `a` ON (`a`.`` = `b`.``);
SELECT * FROM `a` JOIN `b`;
SELECT * FROM `a` INNER JOIN `b`;
SELECT * FROM `a` JOIN `b` USING (``);
SELECT * FROM `a` INNER JOIN `b` USING (``);
SELECT * FROM `a` CROSS JOIN `b`;
SELECT * FROM `a` LEFT JOIN `b` USING (``);
SELECT * FROM `a` LEFT JOIN `b` ON (`a`.`` = `b`.``);
SELECT * FROM `b` RIGHT JOIN `a` USING (``);
SELECT * FROM `b` RIGHT JOIN `a` ON (`a`.`` = `b`.``);
SELECT * FROM `a` JOIN `b`;
SELECT * FROM `a` INNER JOIN `b`;
SELECT * FROM `a` JOIN `b` USING (``);
SELECT * FROM `a` INNER JOIN `b` USING (``);
SELECT * FROM `a` CROSS JOIN `b`;
SELECT * FROM `a` LEFT JOIN `b` USING (``);
SELECT * FROM `a` LEFT JOIN `b` ON (`a`.`` = `b`.``);
SELECT * FROM `b` RIGHT JOIN `a` USING (``);
SELECT * FROM `b` RIGHT JOIN `a` ON (`a`.`` = `b`.``);
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;
DROP TABLE `a`;
DROP TABLE `b`;