| 1 |
# This is the test for bug 46000. We shall |
| 2 |
# block any index creation with the name of |
| 3 |
# "GEN_CLUST_INDEX", which is the reserved |
| 4 |
# name for innodb default primary index. |
| 5 |
|
| 6 |
|
| 7 |
# This 'create table' operation should fail because of |
| 8 |
# using the reserve name as its index name. |
| 9 |
--error ER_WRONG_NAME_FOR_INDEX |
| 10 |
create table bug46000(`id` int,key `GEN_CLUST_INDEX`(`id`))engine=innodb; |
| 11 |
|
| 12 |
# Mixed upper/lower case of the reserved key words |
| 13 |
--error ER_WRONG_NAME_FOR_INDEX |
| 14 |
create table bug46000(`id` int, key `GEN_clust_INDEX`(`id`))engine=innodb; |
| 15 |
|
| 16 |
show warnings; |
| 17 |
|
| 18 |
create table bug46000(id int) engine=innodb; |
| 19 |
|
| 20 |
# This 'create index' operation should fail. |
| 21 |
--error ER_WRONG_NAME_FOR_INDEX |
| 22 |
create index GEN_CLUST_INDEX on bug46000(id); |
| 23 |
|
| 24 |
show warnings; |
| 25 |
|
| 26 |
# This 'create index' operation should succeed, no |
| 27 |
# temp table left from last failed create index |
| 28 |
# operation. |
| 29 |
create index idx on bug46000(id); |
| 30 |
|
| 31 |
drop table bug46000; |