-- source include/have_innodb.inc
-- source include/have_bdb.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 `Ｔ９`;
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 = heap;
CREATE TABLE `Ｔ８` (`Ｃ１` ENUM('あ','い','う'), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = heap;
CREATE TABLE `Ｔ９` (`Ｃ１` ENUM('龔','龖','龗'), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = heap;
CREATE TABLE `Ｔ１０` (`Ｃ１` ENUM('ｱ','ｲ','ｳ'), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = bdb;
CREATE TABLE `Ｔ１１` (`Ｃ１` ENUM('あ','い','う'), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = bdb;
CREATE TABLE `Ｔ１２` (`Ｃ１` ENUM('龔','龖','龗'), INDEX(`Ｃ１`)) DEFAULT CHARSET = utf8 engine = bdb;

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 ('龔'),('龖'),('龗');
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 `Ｔ９`;
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 `Ｔ９`;
SHOW CREATE TABLE `Ｔ１０`;
SHOW CREATE TABLE `Ｔ１１`;
SHOW CREATE TABLE `Ｔ１２`;

DESC `Ｔ１`;
DESC `Ｔ２`;
DESC `Ｔ３`;
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;
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 `Ｔ９`;
SHOW CREATE TABLE `Ｔ１０`;
SHOW CREATE TABLE `Ｔ１１`;
SHOW CREATE TABLE `Ｔ１２`;

DESC `Ｔ１`;
DESC `Ｔ２`;
DESC `Ｔ３`;
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 `Ｔ９`;
DROP TABLE `Ｔ１０`;
DROP TABLE `Ｔ１１`;
DROP TABLE `Ｔ１２`;
