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

96 lines
4.1 KiB
Text
Raw Normal View History

--source include/have_sjis.inc
--source include/have_ucs2.inc
--source include/have_ujis.inc
--source include/have_utf8.inc
--source include/have_innodb.inc
--disable_warnings
drop table if exists `<60>ԣ<EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD>`;
drop table if exists `<60>ԣ<EFBFBD>`;
--enable_warnings
#
# Test CONVERT() function with Japanese character in ujis encoding
#
SET NAMES ujis;
SET character_set_database = ujis;
CREATE TABLE `<60>ԣ<EFBFBD>` (`<60>ã<EFBFBD>` char(20), INDEX(`<60>ã<EFBFBD>`)) DEFAULT CHARSET = ujis engine = innodb;
CREATE TABLE `<60>ԣ<EFBFBD>` (`<60>ã<EFBFBD>` char(20), INDEX(`<60>ã<EFBFBD>`)) DEFAULT CHARSET = ujis engine = innodb;
CREATE TABLE `<60>ԣ<EFBFBD>` (`<60>ã<EFBFBD>` char(20), INDEX(`<60>ã<EFBFBD>`)) DEFAULT CHARSET = ujis engine = innodb;
CREATE TABLE `<60>ԣ<EFBFBD>` (`<60>ã<EFBFBD>` char(20), INDEX(`<60>ã<EFBFBD>`)) DEFAULT CHARSET = ujis engine = myisam;
CREATE TABLE `<60>ԣ<EFBFBD>` (`<60>ã<EFBFBD>` char(20), INDEX(`<60>ã<EFBFBD>`)) DEFAULT CHARSET = ujis engine = myisam;
CREATE TABLE `<60>ԣ<EFBFBD>` (`<60>ã<EFBFBD>` char(20), INDEX(`<60>ã<EFBFBD>`)) DEFAULT CHARSET = ujis engine = myisam;
CREATE TABLE `<60>ԣ<EFBFBD>` (`<60>ã<EFBFBD>` char(20), INDEX(`<60>ã<EFBFBD>`)) DEFAULT CHARSET = ujis engine = MEMORY;
CREATE TABLE `<60>ԣ<EFBFBD>` (`<60>ã<EFBFBD>` char(20), INDEX(`<60>ã<EFBFBD>`)) DEFAULT CHARSET = ujis engine = MEMORY;
CREATE TABLE `<60>ԣ<EFBFBD>` (`<60>ã<EFBFBD>` char(20), INDEX(`<60>ã<EFBFBD>`)) DEFAULT CHARSET = ujis engine = MEMORY;
#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 `<60>ԣ<EFBFBD>`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_ujis.dat' INTO TABLE `<60>ԣ<EFBFBD>`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0212_ujis.dat' INTO TABLE `<60>ԣ<EFBFBD>`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_ujis.dat' INTO TABLE `<60>ԣ<EFBFBD>`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_ujis.dat' INTO TABLE `<60>ԣ<EFBFBD>`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0212_ujis.dat' INTO TABLE `<60>ԣ<EFBFBD>`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_ujis.dat' INTO TABLE `<60>ԣ<EFBFBD>`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_ujis.dat' INTO TABLE `<60>ԣ<EFBFBD>`;
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0212_ujis.dat' INTO TABLE `<60>ԣ<EFBFBD>`;
#InnoDB
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using utf8) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using ucs2) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using sjis) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using utf8) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using ucs2) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using sjis) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using utf8) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using ucs2) FROM `<60>ԣ<EFBFBD>`;
# The result will get garbled because jisx0212 is not included in sjis
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using sjis) FROM `<60>ԣ<EFBFBD>`;
#MyISAM
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using utf8) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using ucs2) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using sjis) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using utf8) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using ucs2) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using sjis) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using utf8) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using ucs2) FROM `<60>ԣ<EFBFBD>`;
# The result will get garbled because jisx0212 is not included in sjis
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using sjis) FROM `<60>ԣ<EFBFBD>`;
#MEMORY
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using utf8) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using ucs2) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using sjis) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using utf8) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using ucs2) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using sjis) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using utf8) FROM `<60>ԣ<EFBFBD>`;
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using ucs2) FROM `<60>ԣ<EFBFBD>`;
# The result will get garbled because jisx0212 is not included in sjis
SELECT `<60>ã<EFBFBD>`, CONVERT(`<60>ã<EFBFBD>` using sjis) FROM `<60>ԣ<EFBFBD>`;
drop table `<60>ԣ<EFBFBD>`;
drop table `<60>ԣ<EFBFBD>`;
drop table `<60>ԣ<EFBFBD>`;
drop table `<60>ԣ<EFBFBD>`;
drop table `<60>ԣ<EFBFBD>`;
drop table `<60>ԣ<EFBFBD>`;
drop table `<60>ԣ<EFBFBD>`;
drop table `<60>ԣ<EFBFBD>`;
drop table `<60>ԣ<EFBFBD>`;