mariadb/mysql-test/suite/jp/t/jp_enum_ucs2.test
2025-04-29 13:53:16 +10:00

123 lines
3.9 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#Server variable option 'lower_case_table_names' sets '0' as default value
#in case sensitive filesystem. Using 'lower_case_table_names=0' in case of
#insensitive filsystem is not allowed.
-- source include/have_case_sensitive_file_system.inc
--source include/have_ucs2.inc
--source include/have_innodb.inc
# half-with kana is not handled correctly in 4.1
# because of bug #5174
# It will be fixed in 5.0
--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 ``;
--enable_warnings
#
# Test ENUM values with Japanese characters in ucs2 encoding
#
SET NAMES ujis;
SET character_set_database = ucs2;
SET collation_connection = ucs2_general_ci;
CREATE TABLE `` (`` ENUM('ア','イ','ウ'), INDEX(``)) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `` (`` ENUM('あ','い','う'), INDEX(``)) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `` (`` ENUM('龔','龖','龗'), INDEX(``)) DEFAULT CHARSET = ucs2 engine = innodb;
CREATE TABLE `` (`` ENUM('ア','イ','ウ'), INDEX(``)) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `` (`` ENUM('あ','い','う'), INDEX(``)) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `` (`` ENUM('龔','龖','龗'), INDEX(``)) DEFAULT CHARSET = ucs2 engine = myisam;
CREATE TABLE `` (`` ENUM('ア','イ','ウ'), INDEX(``)) DEFAULT CHARSET = ucs2 engine = MEMORY;
CREATE TABLE `` (`` ENUM('あ','い','う'), INDEX(``)) DEFAULT CHARSET = ucs2 engine = MEMORY;
CREATE TABLE `` (`` ENUM('龔','龖','龗'), INDEX(``)) DEFAULT CHARSET = ucs2 engine = MEMORY;
INSERT INTO `` VALUES ('ア'),('イ'),('ウ');
INSERT INTO `` VALUES ('あ'),('い'),('う');
INSERT INTO `` VALUES ('龔'),('龖'),('龗');
INSERT INTO `` VALUES ('ア'),('イ'),('ウ');
INSERT INTO `` VALUES ('あ'),('い'),('う');
INSERT INTO `` VALUES ('龔'),('龖'),('龗');
INSERT INTO `` VALUES ('ア'),('イ'),('ウ');
INSERT INTO `` VALUES ('あ'),('い'),('う');
INSERT INTO `` VALUES ('龔'),('龖'),('龗');
SELECT * FROM ``;
SELECT * FROM ``;
SELECT * FROM ``;
SELECT * FROM ``;
SELECT * FROM ``;
SELECT * FROM ``;
SELECT * FROM ``;
SELECT * FROM ``;
SELECT * FROM ``;
SHOW CREATE TABLE ``;
SHOW CREATE TABLE ``;
SHOW CREATE TABLE ``;
SHOW CREATE TABLE ``;
SHOW CREATE TABLE ``;
SHOW CREATE TABLE ``;
SHOW CREATE TABLE ``;
SHOW CREATE TABLE ``;
SHOW CREATE TABLE ``;
DESC ``;
DESC ``;
DESC ``;
DESC ``;
DESC ``;
DESC ``;
DESC ``;
DESC ``;
DESC ``;
#
# Test problem with enum values after the column with NOT NULL restriction
# Bug#7302 UCS2 data in ENUM field get truncated when new column is added
ALTER TABLE `` ADD `` CHAR(1) NOT NULL FIRST;
ALTER TABLE `` ADD `` CHAR(1) NOT NULL FIRST;
ALTER TABLE `` ADD `` CHAR(1) NOT NULL FIRST;
ALTER TABLE `` ADD `` CHAR(1) NOT NULL FIRST;
ALTER TABLE `` ADD `` CHAR(1) NOT NULL FIRST;
ALTER TABLE `` ADD `` CHAR(1) NOT NULL FIRST;
ALTER TABLE `` ADD `` CHAR(1) NOT NULL FIRST;
ALTER TABLE `` ADD `` CHAR(1) NOT NULL FIRST;
ALTER TABLE `` ADD `` CHAR(1) NOT NULL FIRST;
SHOW CREATE TABLE ``;
SHOW CREATE TABLE ``;
SHOW CREATE TABLE ``;
SHOW CREATE TABLE ``;
SHOW CREATE TABLE ``;
SHOW CREATE TABLE ``;
SHOW CREATE TABLE ``;
SHOW CREATE TABLE ``;
SHOW CREATE TABLE ``;
DESC ``;
DESC ``;
DESC ``;
DESC ``;
DESC ``;
DESC ``;
DESC ``;
DESC ``;
DESC ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;
DROP TABLE ``;