2009-10-16 13:58:02 +02:00
|
|
|
# This is the test for bug 46000. We shall
|
|
|
|
# block any index creation with the name of
|
|
|
|
# "GEN_CLUST_INDEX", which is the reserved
|
|
|
|
# name for innodb default primary index.
|
|
|
|
|
|
|
|
--source include/have_innodb.inc
|
|
|
|
|
|
|
|
# This 'create table' operation should fail because of
|
|
|
|
# using the reserve name as its index name.
|
2009-11-05 14:23:50 +01:00
|
|
|
--error ER_WRONG_NAME_FOR_INDEX
|
2009-10-16 13:58:02 +02:00
|
|
|
create table bug46000(`id` int,key `GEN_CLUST_INDEX`(`id`))engine=innodb;
|
|
|
|
|
|
|
|
# Mixed upper/lower case of the reserved key words
|
2009-11-05 14:23:50 +01:00
|
|
|
--error ER_WRONG_NAME_FOR_INDEX
|
2009-10-16 13:58:02 +02:00
|
|
|
create table bug46000(`id` int, key `GEN_clust_INDEX`(`id`))engine=innodb;
|
|
|
|
|
2009-11-05 14:23:50 +01:00
|
|
|
show warnings;
|
2009-10-16 13:58:02 +02:00
|
|
|
|
|
|
|
create table bug46000(id int) engine=innodb;
|
|
|
|
|
|
|
|
# This 'create index' operation should fail.
|
2009-11-05 14:23:50 +01:00
|
|
|
--error ER_WRONG_NAME_FOR_INDEX
|
2009-10-16 13:58:02 +02:00
|
|
|
create index GEN_CLUST_INDEX on bug46000(id);
|
|
|
|
|
2009-11-05 14:23:50 +01:00
|
|
|
show warnings;
|
2009-10-16 13:58:02 +02:00
|
|
|
|
|
|
|
# This 'create index' operation should succeed, no
|
|
|
|
# temp table left from last failed create index
|
|
|
|
# operation.
|
|
|
|
create index idx on bug46000(id);
|
|
|
|
|
|
|
|
drop table bug46000;
|