--source include/have_utf8.inc
--source include/have_innodb.inc
--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 utf8 encoding
#

SET NAMES utf8;
SET character_set_database = utf8;

CREATE TABLE `Ｔ１` (`Ｃ１` ENUM('ｱ','ｲ','ｳ'), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `Ｔ２` (`Ｃ１` ENUM('あ','い','う'), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `Ｔ３` (`Ｃ１` ENUM('龔','龖','龗'), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = innodb;
CREATE TABLE `Ｔ４` (`Ｃ１` ENUM('ｱ','ｲ','ｳ'), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `Ｔ５` (`Ｃ１` ENUM('あ','い','う'), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `Ｔ６` (`Ｃ１` ENUM('龔','龖','龗'), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = myisam;
CREATE TABLE `Ｔ７` (`Ｃ１` ENUM('ｱ','ｲ','ｳ'), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = MEMORY;
CREATE TABLE `Ｔ８` (`Ｃ１` ENUM('あ','い','う'), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = MEMORY;
CREATE TABLE `Ｔ９` (`Ｃ１` ENUM('龔','龖','龗'), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 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 colum with  NOT NULL restriction
#

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 `Ｔ９`;
