From 0fcddbc2ae77a33908a11b097a731804f8d2a258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Tue, 11 Mar 2014 13:49:52 +0200 Subject: [PATCH] Added multi-key unique test case. --- mysql-test/suite/innodb/r/innodb_force_pk.result | 6 ++++++ mysql-test/suite/innodb/t/innodb_force_pk.test | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/mysql-test/suite/innodb/r/innodb_force_pk.result b/mysql-test/suite/innodb/r/innodb_force_pk.result index faf81a2e452..d8abfda35e1 100644 --- a/mysql-test/suite/innodb/r/innodb_force_pk.result +++ b/mysql-test/suite/innodb/r/innodb_force_pk.result @@ -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 diff --git a/mysql-test/suite/innodb/t/innodb_force_pk.test b/mysql-test/suite/innodb/t/innodb_force_pk.test index 0462aa206f7..4361a58d2f5 100644 --- a/mysql-test/suite/innodb/t/innodb_force_pk.test +++ b/mysql-test/suite/innodb/t/innodb_force_pk.test @@ -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;