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

169 lines
9.8 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 LIKE pattern matching using Japanese characters in utf8 encoding
#
SET NAMES utf8;
SET character_set_database = utf8;
CREATE TABLE `` (`` char(20), INDEX(``)) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `` (`` char(20), INDEX(``)) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `` (`` char(20), INDEX(``)) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `` (`` char(20), INDEX(``)) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `` (`` char(20), INDEX(``)) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `` (`` char(20), INDEX(``)) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `` (`` char(20), INDEX(``)) DEFAULT CHARSET = utf8 engine = heap;
CREATE TABLE `` (`` char(20), INDEX(``)) DEFAULT CHARSET = utf8 engine = heap;
CREATE TABLE `` (`` char(20), INDEX(``)) DEFAULT CHARSET = utf8 engine = heap;
CREATE TABLE `` (`` char(20), INDEX(``)) DEFAULT CHARSET = utf8 engine = bdb;
CREATE TABLE `` (`` char(20), INDEX(``)) DEFAULT CHARSET = utf8 engine = bdb;
CREATE TABLE `` (`` char(20), INDEX(``)) DEFAULT CHARSET = utf8 engine = bdb;
#Load the following data in each table
# jisx0201 hankaku-katakana data
# jisx0208 data
# jisx0212 supplemental character data
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_utf8.dat' INTO TABLE ``;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_utf8.dat' INTO TABLE ``;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0212_utf8.dat' INTO TABLE ``;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_utf8.dat' INTO TABLE ``;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_utf8.dat' INTO TABLE ``;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0212_utf8.dat' INTO TABLE ``;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_utf8.dat' INTO TABLE ``;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_utf8.dat' INTO TABLE ``;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0212_utf8.dat' INTO TABLE ``;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_utf8.dat' INTO TABLE ``;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_utf8.dat' INTO TABLE ``;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0212_utf8.dat' INTO TABLE ``;
#InnoDB
SELECT * FROM `` WHERE `` LIKE ' %';
SELECT * FROM `` WHERE `` LIKE '% %';
SELECT * FROM `` WHERE `` LIKE '% ';
SELECT * FROM `` WHERE `` LIKE 'タ%';
SELECT * FROM `` WHERE `` LIKE '%ラリ%';
SELECT * FROM `` WHERE `` LIKE '%ソ';
SELECT * FROM `` WHERE `` LIKE 'ーアイウエオカキクケコサシスセソ%';
SELECT * FROM `` WHERE `` LIKE '%ーアイウエオカキクケコサシスセソ%';
SELECT * FROM `` WHERE `` LIKE '%ーアイウエオカキクケコサシスセソ';
SELECT * FROM `` WHERE `` LIKE ' %';
SELECT * FROM `` WHERE `` LIKE '% %';
SELECT * FROM `` WHERE `` LIKE '% ';
SELECT * FROM `` WHERE `` LIKE 'と%';
SELECT * FROM `` WHERE `` LIKE '%あ%';
SELECT * FROM `` WHERE `` LIKE '%わ';
SELECT * FROM `` WHERE `` LIKE '・ぁあぃいぅうぇえぉおかがきぎくぐけげこ%';
SELECT * FROM `` WHERE `` LIKE '%・ぁあぃいぅうぇえぉおかがきぎくぐけげこ%';
SELECT * FROM `` WHERE `` LIKE '%・ぁあぃいぅうぇえぉおかがきぎくぐけげこ';
SELECT * FROM `` WHERE `` LIKE '鼫%';
SELECT * FROM `` WHERE `` LIKE '%鼺%';
SELECT * FROM `` WHERE `` LIKE '%齖';
SELECT * FROM `` WHERE `` LIKE '鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖%';
SELECT * FROM `` WHERE `` LIKE '%鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖%';
SELECT * FROM `` WHERE `` LIKE '%鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖';
#MyISAM
SELECT * FROM `` WHERE `` LIKE ' %';
SELECT * FROM `` WHERE `` LIKE '% %';
SELECT * FROM `` WHERE `` LIKE '% ';
SELECT * FROM `` WHERE `` LIKE 'タ%';
SELECT * FROM `` WHERE `` LIKE '%ラリ%';
SELECT * FROM `` WHERE `` LIKE '%ソ';
SELECT * FROM `` WHERE `` LIKE 'ーアイウエオカキクケコサシスセソ%';
SELECT * FROM `` WHERE `` LIKE '%ーアイウエオカキクケコサシスセソ%';
SELECT * FROM `` WHERE `` LIKE '%ーアイウエオカキクケコサシスセソ';
SELECT * FROM `` WHERE `` LIKE ' %';
SELECT * FROM `` WHERE `` LIKE '% %';
SELECT * FROM `` WHERE `` LIKE '% ';
SELECT * FROM `` WHERE `` LIKE 'と%';
SELECT * FROM `` WHERE `` LIKE '%あ%';
SELECT * FROM `` WHERE `` LIKE '%わ';
SELECT * FROM `` WHERE `` LIKE '・ぁあぃいぅうぇえぉおかがきぎくぐけげこ%';
SELECT * FROM `` WHERE `` LIKE '%・ぁあぃいぅうぇえぉおかがきぎくぐけげこ%';
SELECT * FROM `` WHERE `` LIKE '%・ぁあぃいぅうぇえぉおかがきぎくぐけげこ';
SELECT * FROM `` WHERE `` LIKE '鼫%';
SELECT * FROM `` WHERE `` LIKE '%鼺%';
SELECT * FROM `` WHERE `` LIKE '%齖';
SELECT * FROM `` WHERE `` LIKE '鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖%';
SELECT * FROM `` WHERE `` LIKE '%鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖%';
SELECT * FROM `` WHERE `` LIKE '%鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖';
#Heap
SELECT * FROM `` WHERE `` LIKE ' %';
SELECT * FROM `` WHERE `` LIKE '% %';
SELECT * FROM `` WHERE `` LIKE '% ';
SELECT * FROM `` WHERE `` LIKE 'タ%';
SELECT * FROM `` WHERE `` LIKE '%ラリ%';
SELECT * FROM `` WHERE `` LIKE '%ソ';
SELECT * FROM `` WHERE `` LIKE 'ーアイウエオカキクケコサシスセソ%';
SELECT * FROM `` WHERE `` LIKE '%ーアイウエオカキクケコサシスセソ%';
SELECT * FROM `` WHERE `` LIKE '%ーアイウエオカキクケコサシスセソ';
SELECT * FROM `` WHERE `` LIKE ' %';
SELECT * FROM `` WHERE `` LIKE '% %';
SELECT * FROM `` WHERE `` LIKE '% ';
SELECT * FROM `` WHERE `` LIKE 'と%';
SELECT * FROM `` WHERE `` LIKE '%あ%';
SELECT * FROM `` WHERE `` LIKE '%わ';
SELECT * FROM `` WHERE `` LIKE '・ぁあぃいぅうぇえぉおかがきぎくぐけげこ%';
SELECT * FROM `` WHERE `` LIKE '%・ぁあぃいぅうぇえぉおかがきぎくぐけげこ%';
SELECT * FROM `` WHERE `` LIKE '%・ぁあぃいぅうぇえぉおかがきぎくぐけげこ';
SELECT * FROM `` WHERE `` LIKE '鼫%';
SELECT * FROM `` WHERE `` LIKE '%鼺%';
SELECT * FROM `` WHERE `` LIKE '%齖';
SELECT * FROM `` WHERE `` LIKE '鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖%';
SELECT * FROM `` WHERE `` LIKE '%鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖%';
SELECT * FROM `` WHERE `` LIKE '%鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖';
#BDB
SELECT * FROM `` WHERE `` LIKE ' %';
SELECT * FROM `` WHERE `` LIKE '% %';
SELECT * FROM `` WHERE `` LIKE '% ';
SELECT * FROM `` WHERE `` LIKE 'タ%';
SELECT * FROM `` WHERE `` LIKE '%ラリ%';
SELECT * FROM `` WHERE `` LIKE '%ソ';
#SELECT * FROM `` WHERE `` LIKE 'ーアイウエオカキクケコサシスセソ%';
#SELECT * FROM `` WHERE `` LIKE '%ーアイウエオカキクケコサシスセソ%';
#SELECT * FROM `` WHERE `` LIKE '%ーアイウエオカキクケコサシスセソ';
SELECT * FROM `` WHERE `` LIKE ' %';
SELECT * FROM `` WHERE `` LIKE '% %';
SELECT * FROM `` WHERE `` LIKE '% ';
SELECT * FROM `` WHERE `` LIKE 'と%';
SELECT * FROM `` WHERE `` LIKE '%あ%';
SELECT * FROM `` WHERE `` LIKE '%わ';
#SELECT * FROM `` WHERE `` LIKE '・ぁあぃいぅうぇえぉおかがきぎくぐけげこ%';
#SELECT * FROM `` WHERE `` LIKE '%・ぁあぃいぅうぇえぉおかがきぎくぐけげこ%';
#SELECT * FROM `` WHERE `` LIKE '%・ぁあぃいぅうぇえぉおかがきぎくぐけげこ';
SELECT * FROM `` WHERE `` LIKE '鼫%';
SELECT * FROM `` WHERE `` LIKE '%鼺%';
SELECT * FROM `` WHERE `` LIKE '%齖';
#SELECT * FROM `` WHERE `` LIKE '鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖%';
#SELECT * FROM `` WHERE `` LIKE '%鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖%';
#SELECT * FROM `` WHERE `` LIKE '%鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖';
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;