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

134 lines
6.7 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 CHARSET() function with Japanese characters in utf8 encoding
#
SET NAMES utf8;
SET character_set_database = utf8;
CREATE TABLE `` (`` char(20)) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `` (`` char(20)) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `` (`` char(20)) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `` (`` char(20)) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `` (`` char(20)) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `` (`` char(20)) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `` (`` char(20)) DEFAULT CHARSET = utf8 engine = heap;
CREATE TABLE `` (`` char(20)) DEFAULT CHARSET = utf8 engine = heap;
CREATE TABLE `` (`` char(20)) DEFAULT CHARSET = utf8 engine = heap;
CREATE TABLE `` (`` char(20)) DEFAULT CHARSET = utf8 engine = bdb;
CREATE TABLE `` (`` char(20)) DEFAULT CHARSET = utf8 engine = bdb;
CREATE TABLE `` (`` char(20)) 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 DISTINCT CHARSET(``) FROM ``;
SELECT DISTINCT CHARSET(``) FROM ``;
SELECT DISTINCT CHARSET(``) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING utf8)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ucs2)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING sjis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ujis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING utf8)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ucs2)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING sjis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ujis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING utf8)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ucs2)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING sjis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ujis)) FROM ``;
#MyISAM
SELECT DISTINCT CHARSET(``) FROM ``;
SELECT DISTINCT CHARSET(``) FROM ``;
SELECT DISTINCT CHARSET(``) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING utf8)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ucs2)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING sjis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ujis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING utf8)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ucs2)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING sjis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ujis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING utf8)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ucs2)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING sjis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ujis)) FROM ``;
#Heap
SELECT DISTINCT CHARSET(``) FROM ``;
SELECT DISTINCT CHARSET(``) FROM ``;
SELECT DISTINCT CHARSET(``) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING utf8)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ucs2)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING sjis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ujis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING utf8)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ucs2)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING sjis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ujis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING utf8)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ucs2)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING sjis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ujis)) FROM ``;
#BDB
SELECT DISTINCT CHARSET(``) FROM ``;
SELECT DISTINCT CHARSET(``) FROM ``;
SELECT DISTINCT CHARSET(``) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING utf8)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ucs2)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING sjis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ujis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING utf8)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ucs2)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING sjis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ujis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING utf8)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ucs2)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING sjis)) FROM ``;
SELECT DISTINCT CHARSET(CONVERT(`` USING ujis)) 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 ``;