diff options
Diffstat (limited to 'mysql-test/t/innodb.test')
-rw-r--r-- | mysql-test/t/innodb.test | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index a452f79f949..cf7be4f882c 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -1158,3 +1158,25 @@ show status like "binlog_cache_use"; show status like "binlog_cache_disk_use"; drop table t1; + +# +# Bug #6126: Duplicate columns in keys gives misleading error message +# +--error 1060 +create table t1 (c char(10), index (c,c)) engine=innodb; +--error 1060 +create table t1 (c1 char(10), c2 char(10), index (c1,c2,c1)) engine=innodb; +--error 1060 +create table t1 (c1 char(10), c2 char(10), index (c1,c1,c2)) engine=innodb; +--error 1060 +create table t1 (c1 char(10), c2 char(10), index (c2,c1,c1)) engine=innodb; +create table t1 (c1 char(10), c2 char(10)) engine=innodb; +--error 1060 +alter table t1 add key (c1,c1); +--error 1060 +alter table t1 add key (c2,c1,c1); +--error 1060 +alter table t1 add key (c1,c2,c1); +--error 1060 +alter table t1 add key (c1,c1,c2); +drop table t1; |