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/r/key.result | |
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/r/key.result')
-rw-r--r-- | mysql-test/r/key.result | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result index e74bda23da9..cceaf393a60 100644 --- a/mysql-test/r/key.result +++ b/mysql-test/r/key.result @@ -307,3 +307,21 @@ test.t1 check status OK drop table t1; create table t1 (c char(10), index (c(0))); ERROR HY000: Key part 'c' length cannot be 0 +create table t1 (c char(10), index (c,c)); +ERROR 42S21: Duplicate column name 'c' +create table t1 (c1 char(10), c2 char(10), index (c1,c2,c1)); +ERROR 42S21: Duplicate column name 'c1' +create table t1 (c1 char(10), c2 char(10), index (c1,c1,c2)); +ERROR 42S21: Duplicate column name 'c1' +create table t1 (c1 char(10), c2 char(10), index (c2,c1,c1)); +ERROR 42S21: Duplicate column name 'c1' +create table t1 (c1 char(10), c2 char(10)); +alter table t1 add key (c1,c1); +ERROR 42S21: Duplicate column name 'c1' +alter table t1 add key (c2,c1,c1); +ERROR 42S21: Duplicate column name 'c1' +alter table t1 add key (c1,c2,c1); +ERROR 42S21: Duplicate column name 'c1' +alter table t1 add key (c1,c1,c2); +ERROR 42S21: Duplicate column name 'c1' +drop table t1; |