mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 21:42:35 +01:00
77bc68f99d
Change mode to -rw-rw----
110 lines
4.9 KiB
Text
110 lines
4.9 KiB
Text
--character_set sjis
|
||
SET NAMES sjis;
|
||
SET character_set_database = sjis;
|
||
|
||
--disable_warnings
|
||
drop table if exists `‚s‚P`;
|
||
drop table if exists `‚s‚Q`;
|
||
drop table if exists `‚s‚R`;
|
||
drop table if exists `‚s‚S`;
|
||
drop table if exists `‚s‚T`;
|
||
drop table if exists `‚s‚U`;
|
||
drop table if exists `‚s‚V`;
|
||
drop table if exists `‚s‚W`;
|
||
drop table if exists `‚s‚X`;
|
||
drop table if exists `‚s‚P‚O`;
|
||
drop table if exists `‚s‚P‚P`;
|
||
drop table if exists `‚s‚P‚Q`;
|
||
--enable_warnings
|
||
|
||
#
|
||
# Test CONVERT() function with Japanese character in sjis encoding
|
||
#
|
||
|
||
CREATE TABLE `‚s‚P` (`‚b‚P` char(20), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = innodb;
|
||
CREATE TABLE `‚s‚Q` (`‚b‚P` char(20), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = innodb;
|
||
CREATE TABLE `‚s‚R` (`‚b‚P` char(20), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = innodb;
|
||
CREATE TABLE `‚s‚S` (`‚b‚P` char(20), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = myisam;
|
||
CREATE TABLE `‚s‚T` (`‚b‚P` char(20), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = myisam;
|
||
CREATE TABLE `‚s‚U` (`‚b‚P` char(20), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = myisam;
|
||
CREATE TABLE `‚s‚V` (`‚b‚P` char(20), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = heap;
|
||
CREATE TABLE `‚s‚W` (`‚b‚P` char(20), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = heap;
|
||
CREATE TABLE `‚s‚X` (`‚b‚P` char(20), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = heap;
|
||
CREATE TABLE `‚s‚P‚O` (`‚b‚P` char(20), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = bdb;
|
||
CREATE TABLE `‚s‚P‚P` (`‚b‚P` char(20), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis engine = bdb;
|
||
CREATE TABLE `‚s‚P‚Q` (`‚b‚P` char(20), INDEX(`‚b‚P`)) DEFAULT CHARSET = sjis 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_sjis.dat' INTO TABLE `‚s‚P`;
|
||
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `‚s‚Q`;
|
||
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `‚s‚R`;
|
||
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_sjis.dat' INTO TABLE `‚s‚S`;
|
||
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `‚s‚T`;
|
||
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `‚s‚U`;
|
||
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_sjis.dat' INTO TABLE `‚s‚V`;
|
||
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `‚s‚W`;
|
||
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `‚s‚X`;
|
||
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0201_sjis.dat' INTO TABLE `‚s‚P‚O`;
|
||
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis.dat' INTO TABLE `‚s‚P‚P`;
|
||
LOAD DATA LOCAL INFILE 'suite/jp/std_data/jisx0208_sjis2.dat' INTO TABLE `‚s‚P‚Q`;
|
||
|
||
#InnoDB
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚P`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚P`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚P`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚Q`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚Q`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚Q`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚R`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚R`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚R`;
|
||
|
||
#MyISAM
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚S`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚S`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚S`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚T`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚T`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚T`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚U`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚U`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚U`;
|
||
|
||
#Heap
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚V`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚V`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚V`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚W`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚W`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚W`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚X`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚X`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚X`;
|
||
|
||
#BDB
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚P‚O`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚P‚O`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚P‚O`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚P‚P`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚P‚P`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚P‚P`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚P‚Q`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚P‚Q`;
|
||
SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚P‚Q`;
|
||
|
||
drop table `‚s‚P`;
|
||
drop table `‚s‚Q`;
|
||
drop table `‚s‚R`;
|
||
drop table `‚s‚S`;
|
||
drop table `‚s‚T`;
|
||
drop table `‚s‚U`;
|
||
drop table `‚s‚V`;
|
||
drop table `‚s‚W`;
|
||
drop table `‚s‚X`;
|
||
drop table `‚s‚P‚O`;
|
||
drop table `‚s‚P‚P`;
|
||
drop table `‚s‚P‚Q`;
|