Added multi-key unique test case.

This commit is contained in:
Jan Lindström 2014-03-11 13:49:52 +02:00
parent 4e02c2fe56
commit 0fcddbc2ae
2 changed files with 10 additions and 0 deletions

View file

@ -8,6 +8,12 @@ ERROR 42000: This table type requires a primary key
SHOW WARNINGS;
Level Code Message
Error 1173 This table type requires a primary key
CREATE TABLE T1(A INTEGER NOT NULL, B INTEGER,
UNIQUE KEY(A,B)) ENGINE=INNODB;
ERROR 42000: This table type requires a primary key
SHOW WARNINGS;
Level Code Message
Error 1173 This table type requires a primary key
CREATE TABLE T1(A INTEGER NOT NULL PRIMARY KEY) ENGINE=INNODB;
SHOW CREATE TABLE T1;
Table Create Table

View file

@ -8,6 +8,10 @@ SHOW WARNINGS;
-- error 1173
CREATE TABLE T1(A INTEGER UNIQUE KEY) ENGINE=INNODB;
SHOW WARNINGS;
-- error 1173
CREATE TABLE T1(A INTEGER NOT NULL, B INTEGER,
UNIQUE KEY(A,B)) ENGINE=INNODB;
SHOW WARNINGS;
CREATE TABLE T1(A INTEGER NOT NULL PRIMARY KEY) ENGINE=INNODB;
SHOW CREATE TABLE T1;
SHOW WARNINGS;