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

154 lines
4.7 KiB
Text
Raw Normal View History

--character_set sjis
--disable_warnings
drop table if exists `<60>s<EFBFBD>P`;
drop table if exists `<60>s<EFBFBD>Q`;
drop table if exists `<60>s<EFBFBD>R`;
drop table if exists `<60>s<EFBFBD>S`;
drop table if exists `<60>s<EFBFBD>T`;
drop table if exists `<60>s<EFBFBD>U`;
drop table if exists `<60>s<EFBFBD>V`;
drop table if exists `<60>s<EFBFBD>W`;
drop table if exists `<60>s<EFBFBD>X`;
drop table if exists `<60>s<EFBFBD>P<EFBFBD>O`;
drop table if exists `<60>s<EFBFBD>P<EFBFBD>P`;
drop table if exists `<60>s<EFBFBD>P<EFBFBD>Q`;
#drop table if exists t1;
--enable_warnings
#
# Test ENUM values with Japanese characters in sjis encoding
#
SET NAMES sjis;
SET character_set_database = sjis;
CREATE TABLE `<60>s<EFBFBD>P` (`<60>b<EFBFBD>P` ENUM('<27>','<27>','<27>'), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = innodb;
CREATE TABLE `<60>s<EFBFBD>Q` (`<60>b<EFBFBD>P` ENUM('<27><>','<27><>','<27><>'), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = innodb;
CREATE TABLE `<60>s<EFBFBD>R` (`<60>b<EFBFBD>P` ENUM('<27>\','<27>\','<27>\'), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = innodb;
CREATE TABLE `<60>s<EFBFBD>S` (`<60>b<EFBFBD>P` ENUM('<27>','<27>','<27>'), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = myisam;
CREATE TABLE `<60>s<EFBFBD>T` (`<60>b<EFBFBD>P` ENUM('<27><>','<27><>','<27><>'), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = myisam;
CREATE TABLE `<60>s<EFBFBD>U` (`<60>b<EFBFBD>P` ENUM('<27>\','<27>\','<27>\'), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = myisam;
CREATE TABLE `<60>s<EFBFBD>V` (`<60>b<EFBFBD>P` ENUM('<27>','<27>','<27>'), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = heap;
CREATE TABLE `<60>s<EFBFBD>W` (`<60>b<EFBFBD>P` ENUM('<27><>','<27><>','<27><>'), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = heap;
CREATE TABLE `<60>s<EFBFBD>X` (`<60>b<EFBFBD>P` ENUM('<27>\','<27>\','<27>\'), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = heap;
CREATE TABLE `<60>s<EFBFBD>P<EFBFBD>O` (`<60>b<EFBFBD>P` ENUM('<27>','<27>','<27>'), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = bdb;
CREATE TABLE `<60>s<EFBFBD>P<EFBFBD>P` (`<60>b<EFBFBD>P` ENUM('<27><>','<27><>','<27><>'), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = bdb;
CREATE TABLE `<60>s<EFBFBD>P<EFBFBD>Q` (`<60>b<EFBFBD>P` ENUM('<27>\','<27>\','<27>\'), INDEX(`<60>b<EFBFBD>P`)) DEFAULT CHARSET = sjis engine = bdb;
INSERT INTO `<60>s<EFBFBD>P` VALUES ('<27>'),('<27>'),('<27>');
INSERT INTO `<60>s<EFBFBD>Q` VALUES ('<27><>'),('<27><>'),('<27><>');
INSERT INTO `<60>s<EFBFBD>R` VALUES ('<27>\'),('<27>\'),('<27>\');
INSERT INTO `<60>s<EFBFBD>S` VALUES ('<27>'),('<27>'),('<27>');
INSERT INTO `<60>s<EFBFBD>T` VALUES ('<27><>'),('<27><>'),('<27><>');
INSERT INTO `<60>s<EFBFBD>U` VALUES ('<27>\'),('<27>\'),('<27>\');
INSERT INTO `<60>s<EFBFBD>V` VALUES ('<27>'),('<27>'),('<27>');
INSERT INTO `<60>s<EFBFBD>W` VALUES ('<27><>'),('<27><>'),('<27><>');
INSERT INTO `<60>s<EFBFBD>X` VALUES ('<27>\'),('<27>\'),('<27>\');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>O` VALUES ('<27>'),('<27>'),('<27>');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>P` VALUES ('<27><>'),('<27><>'),('<27><>');
INSERT INTO `<60>s<EFBFBD>P<EFBFBD>Q` VALUES ('<27>\'),('<27>\'),('<27>\');
SELECT * FROM `<60>s<EFBFBD>P`;
SELECT * FROM `<60>s<EFBFBD>Q`;
SELECT * FROM `<60>s<EFBFBD>R`;
SELECT * FROM `<60>s<EFBFBD>S`;
SELECT * FROM `<60>s<EFBFBD>T`;
SELECT * FROM `<60>s<EFBFBD>U`;
SELECT * FROM `<60>s<EFBFBD>V`;
SELECT * FROM `<60>s<EFBFBD>W`;
SELECT * FROM `<60>s<EFBFBD>X`;
SELECT * FROM `<60>s<EFBFBD>P<EFBFBD>O`;
SELECT * FROM `<60>s<EFBFBD>P<EFBFBD>P`;
SELECT * FROM `<60>s<EFBFBD>P<EFBFBD>Q`;
SHOW CREATE TABLE `<60>s<EFBFBD>P`;
SHOW CREATE TABLE `<60>s<EFBFBD>Q`;
SHOW CREATE TABLE `<60>s<EFBFBD>R`;
SHOW CREATE TABLE `<60>s<EFBFBD>S`;
SHOW CREATE TABLE `<60>s<EFBFBD>T`;
SHOW CREATE TABLE `<60>s<EFBFBD>U`;
SHOW CREATE TABLE `<60>s<EFBFBD>V`;
SHOW CREATE TABLE `<60>s<EFBFBD>W`;
SHOW CREATE TABLE `<60>s<EFBFBD>X`;
SHOW CREATE TABLE `<60>s<EFBFBD>P<EFBFBD>O`;
SHOW CREATE TABLE `<60>s<EFBFBD>P<EFBFBD>P`;
SHOW CREATE TABLE `<60>s<EFBFBD>P<EFBFBD>Q`;
DESC `<60>s<EFBFBD>P`;
DESC `<60>s<EFBFBD>Q`;
DESC `<60>s<EFBFBD>R`;
DESC `<60>s<EFBFBD>S`;
DESC `<60>s<EFBFBD>T`;
DESC `<60>s<EFBFBD>U`;
DESC `<60>s<EFBFBD>V`;
DESC `<60>s<EFBFBD>W`;
DESC `<60>s<EFBFBD>X`;
DESC `<60>s<EFBFBD>P<EFBFBD>O`;
DESC `<60>s<EFBFBD>P<EFBFBD>P`;
DESC `<60>s<EFBFBD>P<EFBFBD>Q`;
#
# Test problem with enum values after the colum with NOT NULL restriction
#
ALTER TABLE `<60>s<EFBFBD>P` ADD `<60>b<EFBFBD>Q` CHAR(1) NOT NULL FIRST;
ALTER TABLE `<60>s<EFBFBD>Q` ADD `<60>b<EFBFBD>Q` CHAR(1) NOT NULL FIRST;
ALTER TABLE `<60>s<EFBFBD>R` ADD `<60>b<EFBFBD>Q` CHAR(1) NOT NULL FIRST;
ALTER TABLE `<60>s<EFBFBD>S` ADD `<60>b<EFBFBD>Q` CHAR(1) NOT NULL FIRST;
ALTER TABLE `<60>s<EFBFBD>T` ADD `<60>b<EFBFBD>Q` CHAR(1) NOT NULL FIRST;
ALTER TABLE `<60>s<EFBFBD>U` ADD `<60>b<EFBFBD>Q` CHAR(1) NOT NULL FIRST;
ALTER TABLE `<60>s<EFBFBD>V` ADD `<60>b<EFBFBD>Q` CHAR(1) NOT NULL FIRST;
ALTER TABLE `<60>s<EFBFBD>W` ADD `<60>b<EFBFBD>Q` CHAR(1) NOT NULL FIRST;
ALTER TABLE `<60>s<EFBFBD>X` ADD `<60>b<EFBFBD>Q` CHAR(1) NOT NULL FIRST;
ALTER TABLE `<60>s<EFBFBD>P<EFBFBD>O` ADD `<60>b<EFBFBD>Q` CHAR(1) NOT NULL FIRST;
ALTER TABLE `<60>s<EFBFBD>P<EFBFBD>P` ADD `<60>b<EFBFBD>Q` CHAR(1) NOT NULL FIRST;
ALTER TABLE `<60>s<EFBFBD>P<EFBFBD>Q` ADD `<60>b<EFBFBD>Q` CHAR(1) NOT NULL FIRST;
SHOW CREATE TABLE `<60>s<EFBFBD>P`;
SHOW CREATE TABLE `<60>s<EFBFBD>Q`;
SHOW CREATE TABLE `<60>s<EFBFBD>R`;
SHOW CREATE TABLE `<60>s<EFBFBD>S`;
SHOW CREATE TABLE `<60>s<EFBFBD>T`;
SHOW CREATE TABLE `<60>s<EFBFBD>U`;
SHOW CREATE TABLE `<60>s<EFBFBD>V`;
SHOW CREATE TABLE `<60>s<EFBFBD>W`;
SHOW CREATE TABLE `<60>s<EFBFBD>X`;
SHOW CREATE TABLE `<60>s<EFBFBD>P<EFBFBD>O`;
SHOW CREATE TABLE `<60>s<EFBFBD>P<EFBFBD>P`;
SHOW CREATE TABLE `<60>s<EFBFBD>P<EFBFBD>Q`;
#
# Test to distinguish 0x9353 and 0x9373
# bug #6206 need to be fixed
#CREATE TABLE t1(c1 enum('<27>S','<27>s')) default character set = sjis;
#INSERT INTO t1 VALUES('<27>S'),('<27>s');
#SELECT * FROM t1 WHERE c1 LIKE '<27>S';
#DROP TABLE t1;
DESC `<60>s<EFBFBD>P`;
DESC `<60>s<EFBFBD>Q`;
DESC `<60>s<EFBFBD>R`;
DESC `<60>s<EFBFBD>S`;
DESC `<60>s<EFBFBD>T`;
DESC `<60>s<EFBFBD>U`;
DESC `<60>s<EFBFBD>V`;
DESC `<60>s<EFBFBD>W`;
DESC `<60>s<EFBFBD>X`;
DESC `<60>s<EFBFBD>P<EFBFBD>O`;
DESC `<60>s<EFBFBD>P<EFBFBD>P`;
DESC `<60>s<EFBFBD>P<EFBFBD>Q`;
DROP TABLE `<60>s<EFBFBD>P`;
DROP TABLE `<60>s<EFBFBD>Q`;
DROP TABLE `<60>s<EFBFBD>R`;
DROP TABLE `<60>s<EFBFBD>S`;
DROP TABLE `<60>s<EFBFBD>T`;
DROP TABLE `<60>s<EFBFBD>U`;
DROP TABLE `<60>s<EFBFBD>V`;
DROP TABLE `<60>s<EFBFBD>W`;
DROP TABLE `<60>s<EFBFBD>X`;
DROP TABLE `<60>s<EFBFBD>P<EFBFBD>O`;
DROP TABLE `<60>s<EFBFBD>P<EFBFBD>P`;
DROP TABLE `<60>s<EFBFBD>P<EFBFBD>Q`;