diff options
author | unknown <antony@ltantony.rdg.cyberkinetica.homeunix.net> | 2004-11-22 18:07:04 +0000 |
---|---|---|
committer | unknown <antony@ltantony.rdg.cyberkinetica.homeunix.net> | 2004-11-22 18:07:04 +0000 |
commit | 1dc1ad9c9a5ac128a9f03f3729075b1dac21d347 (patch) | |
tree | 7c1923003977b3dfd42e4152b32af6995b8e3b48 /mysql-test/t/key.test | |
parent | 12c0a34205c2c8d449b388960834eb7d24ce3e97 (diff) | |
download | mariadb-git-1dc1ad9c9a5ac128a9f03f3729075b1dac21d347.tar.gz |
Bug#6252 - Duplicate columns in keys should fail
Added check for duplicate column in key
Added tests and fixed tests which exploit bug
mysql-test/r/delete.result:
Fix test as it exploited Bug#6252
mysql-test/r/innodb.result:
Test for Bug#6126
mysql-test/r/key.result:
Test for Bug#6126/6252
mysql-test/r/type_blob.result:
Fix test as it exploited Bug#6252
mysql-test/t/delete.test:
Fix test as it exploited Bug#6252
mysql-test/t/innodb.test:
Test for Bug#6126
mysql-test/t/key.test:
Test for Bug#6126/6252
mysql-test/t/type_blob.test:
Fix test as it exploited Bug#6252
sql/sql_table.cc:
Bug#6252 - Duplicate columns in keys should fail
Added check for duplicate column.
Diffstat (limited to 'mysql-test/t/key.test')
-rw-r--r-- | mysql-test/t/key.test | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test index 5ee2f68ab83..a0a291fdf3c 100644 --- a/mysql-test/t/key.test +++ b/mysql-test/t/key.test @@ -297,3 +297,26 @@ drop table t1; --error 1105 create table t1 (c char(10), index (c(0))); + +# +# Bug #6126: Duplicate columns in keys should fail +# Bug #6252: (dup) +# +--error 1060 +create table t1 (c char(10), index (c,c)); +--error 1060 +create table t1 (c1 char(10), c2 char(10), index (c1,c2,c1)); +--error 1060 +create table t1 (c1 char(10), c2 char(10), index (c1,c1,c2)); +--error 1060 +create table t1 (c1 char(10), c2 char(10), index (c2,c1,c1)); +create table t1 (c1 char(10), c2 char(10)); +--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; |