mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -1630,3 +1630,21 @@ show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 1
|
||||
drop table t1;
|
||||
create table t1 (c char(10), index (c,c)) engine=innodb;
|
||||
ERROR 42S21: Duplicate column name 'c'
|
||||
create table t1 (c1 char(10), c2 char(10), index (c1,c2,c1)) engine=innodb;
|
||||
ERROR 42S21: Duplicate column name 'c1'
|
||||
create table t1 (c1 char(10), c2 char(10), index (c1,c1,c2)) engine=innodb;
|
||||
ERROR 42S21: Duplicate column name 'c1'
|
||||
create table t1 (c1 char(10), c2 char(10), index (c2,c1,c1)) engine=innodb;
|
||||
ERROR 42S21: Duplicate column name 'c1'
|
||||
create table t1 (c1 char(10), c2 char(10)) engine=innodb;
|
||||
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;
|
||||
|
Reference in New Issue
Block a user