mariadb/mysql-test/suite/jp/t/jp_convert_utf8.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

113 lines
5.5 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.

--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 CONVERT() function with Japanese character 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 ``, CONVERT(`` using ujis) FROM ``;
SELECT ``, CONVERT(`` using ucs2) FROM ``;
SELECT ``, CONVERT(`` using sjis) FROM ``;
SELECT ``, CONVERT(`` using ujis) FROM ``;
SELECT ``, CONVERT(`` using ucs2) FROM ``;
SELECT ``, CONVERT(`` using sjis) FROM ``;
SELECT ``, CONVERT(`` using ujis) FROM ``;
SELECT ``, CONVERT(`` using ucs2) FROM ``;
# The result will get garbled because jisx0212 is not included in sjis
SELECT ``, CONVERT(`` using sjis) FROM ``;
#MyISAM
SELECT ``, CONVERT(`` using ujis) FROM ``;
SELECT ``, CONVERT(`` using ucs2) FROM ``;
SELECT ``, CONVERT(`` using sjis) FROM ``;
SELECT ``, CONVERT(`` using ujis) FROM ``;
SELECT ``, CONVERT(`` using ucs2) FROM ``;
SELECT ``, CONVERT(`` using sjis) FROM ``;
SELECT ``, CONVERT(`` using ujis) FROM ``;
SELECT ``, CONVERT(`` using ucs2) FROM ``;
# The result will get garbled because jisx0212 is not included in sjis
SELECT ``, CONVERT(`` using sjis) FROM ``;
#Heap
SELECT ``, CONVERT(`` using ujis) FROM ``;
SELECT ``, CONVERT(`` using ucs2) FROM ``;
SELECT ``, CONVERT(`` using sjis) FROM ``;
SELECT ``, CONVERT(`` using ujis) FROM ``;
SELECT ``, CONVERT(`` using ucs2) FROM ``;
SELECT ``, CONVERT(`` using sjis) FROM ``;
SELECT ``, CONVERT(`` using ujis) FROM ``;
SELECT ``, CONVERT(`` using ucs2) FROM ``;
# The result will get garbled because jisx0212 is not included in sjis
SELECT ``, CONVERT(`` using sjis) FROM ``;
#BDB
SELECT ``, CONVERT(`` using ujis) FROM ``;
SELECT ``, CONVERT(`` using ucs2) FROM ``;
SELECT ``, CONVERT(`` using sjis) FROM ``;
SELECT ``, CONVERT(`` using ujis) FROM ``;
SELECT ``, CONVERT(`` using ucs2) FROM ``;
SELECT ``, CONVERT(`` using sjis) FROM ``;
SELECT ``, CONVERT(`` using ujis) FROM ``;
SELECT ``, CONVERT(`` using ucs2) FROM ``;
# The result will get garbled because jisx0212 is not included in sjis
SELECT ``, CONVERT(`` using sjis) FROM ``;
drop table ``;
drop table ``;
drop table ``;
drop table ``;
drop table ``;
drop table ``;
drop table ``;
drop table ``;
drop table ``;
drop table ``;
drop table ``;
drop table ``;