2008-05-15 18:01:13 +02:00
|
|
|
|
--source include/have_sjis.inc
|
|
|
|
|
--source include/have_ucs2.inc
|
2005-01-07 00:48:38 -08:00
|
|
|
|
--source include/have_ujis.inc
|
2008-05-15 18:01:13 +02:00
|
|
|
|
--source include/have_utf8.inc
|
|
|
|
|
--source include/have_innodb.inc
|
2005-01-07 00:48:38 -08:00
|
|
|
|
|
|
|
|
|
--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;
|
2008-05-15 18:01:13 +02:00
|
|
|
|
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;
|
2005-01-07 00:48:38 -08:00
|
|
|
|
|
|
|
|
|
#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>`;
|
|
|
|
|
|
2008-05-15 18:01:13 +02:00
|
|
|
|
#MEMORY
|
2005-01-07 00:48:38 -08:00
|
|
|
|
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>`;
|