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

114 lines
5.5 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 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 ``;