mariadb/mysql-test/suite/jp/t/jp_like_ujis.test
unknown 888b665e6c Added test data, test case and test result files for Japanese characters test.
I have put the tests into a separate "suite", the first one actually.
Currently this can only be run by the Perl version of mysql-test-run
that is not quite finished. It should, or at least will, be able to
be run with the line

  ./mysql-test-run.pl --suite=jp
2005-01-07 00:48:38 -08:00

170 lines
8.8 KiB
Text
Executable file
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--source include/have_ujis.inc
--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 ujis encoding
#
SET NAMES ujis;
SET character_set_database = ujis;
CREATE TABLE `£Ô£±` (`£Ã£±` char(20), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = innodb;
CREATE TABLE `£Ô£²` (`£Ã£±` char(20), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = innodb;
CREATE TABLE `£Ô£³` (`£Ã£±` char(20), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = innodb;
CREATE TABLE `£Ô£´` (`£Ã£±` char(20), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = myisam;
CREATE TABLE `£Ô£µ` (`£Ã£±` char(20), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = myisam;
CREATE TABLE `£Ô£¶` (`£Ã£±` char(20), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = myisam;
CREATE TABLE `£Ô£·` (`£Ã£±` char(20), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = heap;
CREATE TABLE `£Ô£¸` (`£Ã£±` char(20), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = heap;
CREATE TABLE `£Ô£¹` (`£Ã£±` char(20), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = heap;
CREATE TABLE `£Ô£±£°` (`£Ã£±` char(20), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = bdb;
CREATE TABLE `£Ô£±£±` (`£Ã£±` char(20), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis engine = bdb;
CREATE TABLE `£Ô£±£²` (`£Ã£±` char(20), INDEX(`£Ã£±`)) DEFAULT CHARSET = ujis 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_ujis.dat' INTO TABLE `£Ô£±`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_ujis.dat' INTO TABLE `£Ô£²`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0212_ujis.dat' INTO TABLE `£Ô£³`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_ujis.dat' INTO TABLE `£Ô£´`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_ujis.dat' INTO TABLE `£Ô£µ`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0212_ujis.dat' INTO TABLE `£Ô£¶`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_ujis.dat' INTO TABLE `£Ô£·`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_ujis.dat' INTO TABLE `£Ô£¸`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0212_ujis.dat' INTO TABLE `£Ô£¹`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_ujis.dat' INTO TABLE `£Ô£±£°`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_ujis.dat' INTO TABLE `£Ô£±£±`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0212_ujis.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 '<27>í´%';
SELECT * FROM `£Ô£³` WHERE `£Ã£±` LIKE '%<25>í»%';
SELECT * FROM `£Ô£³` WHERE `£Ã£±` LIKE '%<25>íÇ';
SELECT * FROM `£Ô£³` WHERE `£Ã£±` LIKE '<27>í´<C3AD>íµ<C3AD>í¶<C3AD>í·<C3AD>í¸<C3AD>í¹<C3AD>íº<C3AD>í»<C3AD>í¼<C3AD>í½<C3AD>í¾<C3AD>í¿<C3AD>íÀ<C3AD>íÁ<C3AD>íÂ<C3AD>íÃ<C3AD>íÄ<C3AD>íÅ<C3AD>íÆ<C3AD>íÇ%';
SELECT * FROM `£Ô£³` WHERE `£Ã£±` LIKE '%<25>í´<C3AD>íµ<C3AD>í¶<C3AD>í·<C3AD>í¸<C3AD>í¹<C3AD>íº<C3AD>í»<C3AD>í¼<C3AD>í½<C3AD>í¾<C3AD>í¿<C3AD>íÀ<C3AD>íÁ<C3AD>íÂ<C3AD>íÃ<C3AD>íÄ<C3AD>íÅ<C3AD>íÆ<C3AD>íÇ%';
SELECT * FROM `£Ô£³` WHERE `£Ã£±` LIKE '%<25>í´<C3AD>íµ<C3AD>í¶<C3AD>í·<C3AD>í¸<C3AD>í¹<C3AD>íº<C3AD>í»<C3AD>í¼<C3AD>í½<C3AD>í¾<C3AD>í¿<C3AD>íÀ<C3AD>íÁ<C3AD>íÂ<C3AD>íÃ<C3AD>íÄ<C3AD>íÅ<C3AD>íÆ<C3AD>íÇ';
#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 '<27>í´%';
SELECT * FROM `£Ô£¶` WHERE `£Ã£±` LIKE '%<25>í»%';
SELECT * FROM `£Ô£¶` WHERE `£Ã£±` LIKE '%<25>íÇ';
SELECT * FROM `£Ô£¶` WHERE `£Ã£±` LIKE '<27>í´<C3AD>íµ<C3AD>í¶<C3AD>í·<C3AD>í¸<C3AD>í¹<C3AD>íº<C3AD>í»<C3AD>í¼<C3AD>í½<C3AD>í¾<C3AD>í¿<C3AD>íÀ<C3AD>íÁ<C3AD>íÂ<C3AD>íÃ<C3AD>íÄ<C3AD>íÅ<C3AD>íÆ<C3AD>íÇ%';
SELECT * FROM `£Ô£¶` WHERE `£Ã£±` LIKE '%<25>í´<C3AD>íµ<C3AD>í¶<C3AD>í·<C3AD>í¸<C3AD>í¹<C3AD>íº<C3AD>í»<C3AD>í¼<C3AD>í½<C3AD>í¾<C3AD>í¿<C3AD>íÀ<C3AD>íÁ<C3AD>íÂ<C3AD>íÃ<C3AD>íÄ<C3AD>íÅ<C3AD>íÆ<C3AD>íÇ%';
SELECT * FROM `£Ô£¶` WHERE `£Ã£±` LIKE '%<25>í´<C3AD>íµ<C3AD>í¶<C3AD>í·<C3AD>í¸<C3AD>í¹<C3AD>íº<C3AD>í»<C3AD>í¼<C3AD>í½<C3AD>í¾<C3AD>í¿<C3AD>íÀ<C3AD>íÁ<C3AD>íÂ<C3AD>íÃ<C3AD>íÄ<C3AD>íÅ<C3AD>íÆ<C3AD>íÇ';
#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 '<27>í´%';
SELECT * FROM `£Ô£¹` WHERE `£Ã£±` LIKE '%<25>í»%';
SELECT * FROM `£Ô£¹` WHERE `£Ã£±` LIKE '%<25>íÇ';
SELECT * FROM `£Ô£¹` WHERE `£Ã£±` LIKE '<27>í´<C3AD>íµ<C3AD>í¶<C3AD>í·<C3AD>í¸<C3AD>í¹<C3AD>íº<C3AD>í»<C3AD>í¼<C3AD>í½<C3AD>í¾<C3AD>í¿<C3AD>íÀ<C3AD>íÁ<C3AD>íÂ<C3AD>íÃ<C3AD>íÄ<C3AD>íÅ<C3AD>íÆ<C3AD>íÇ%';
SELECT * FROM `£Ô£¹` WHERE `£Ã£±` LIKE '%<25>í´<C3AD>íµ<C3AD>í¶<C3AD>í·<C3AD>í¸<C3AD>í¹<C3AD>íº<C3AD>í»<C3AD>í¼<C3AD>í½<C3AD>í¾<C3AD>í¿<C3AD>íÀ<C3AD>íÁ<C3AD>íÂ<C3AD>íÃ<C3AD>íÄ<C3AD>íÅ<C3AD>íÆ<C3AD>íÇ%';
SELECT * FROM `£Ô£¹` WHERE `£Ã£±` LIKE '%<25>í´<C3AD>íµ<C3AD>í¶<C3AD>í·<C3AD>í¸<C3AD>í¹<C3AD>íº<C3AD>í»<C3AD>í¼<C3AD>í½<C3AD>í¾<C3AD>í¿<C3AD>íÀ<C3AD>íÁ<C3AD>íÂ<C3AD>íÃ<C3AD>íÄ<C3AD>íÅ<C3AD>íÆ<C3AD>íÇ';
#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 '<27>í´%';
SELECT * FROM `£Ô£±£²` WHERE `£Ã£±` LIKE '%<25>í»%';
SELECT * FROM `£Ô£±£²` WHERE `£Ã£±` LIKE '%<25>íÇ';
#SELECT * FROM `£Ô£±£²` WHERE `£Ã£±` LIKE '<27>í´<C3AD>íµ<C3AD>í¶<C3AD>í·<C3AD>í¸<C3AD>í¹<C3AD>íº<C3AD>í»<C3AD>í¼<C3AD>í½<C3AD>í¾<C3AD>í¿<C3AD>íÀ<C3AD>íÁ<C3AD>íÂ<C3AD>íÃ<C3AD>íÄ<C3AD>íÅ<C3AD>íÆ<C3AD>íÇ%';
#SELECT * FROM `£Ô£±£²` WHERE `£Ã£±` LIKE '%<25>í´<C3AD>íµ<C3AD>í¶<C3AD>í·<C3AD>í¸<C3AD>í¹<C3AD>íº<C3AD>í»<C3AD>í¼<C3AD>í½<C3AD>í¾<C3AD>í¿<C3AD>íÀ<C3AD>íÁ<C3AD>íÂ<C3AD>íÃ<C3AD>íÄ<C3AD>íÅ<C3AD>íÆ<C3AD>íÇ%';
#SELECT * FROM `£Ô£±£²` WHERE `£Ã£±` LIKE '%<25>í´<C3AD>íµ<C3AD>í¶<C3AD>í·<C3AD>í¸<C3AD>í¹<C3AD>íº<C3AD>í»<C3AD>í¼<C3AD>í½<C3AD>í¾<C3AD>í¿<C3AD>íÀ<C3AD>íÁ<C3AD>íÂ<C3AD>íÃ<C3AD>íÄ<C3AD>íÅ<C3AD>íÆ<C3AD>íÇ';
DROP TABLE `£Ô£±`;
DROP TABLE `£Ô£²`;
DROP TABLE `£Ô£³`;
DROP TABLE `£Ô£´`;
DROP TABLE `£Ô£µ`;
DROP TABLE `£Ô£¶`;
DROP TABLE `£Ô£·`;
DROP TABLE `£Ô£¸`;
DROP TABLE `£Ô£¹`;
DROP TABLE `£Ô£±£°`;
DROP TABLE `£Ô£±£±`;
DROP TABLE `£Ô£±£²`;