mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
97d74332c2
BUG#46000 - using index called GEN_CLUST_INDEX crashes server Detailed revision comments: r6180 | jyang | 2009-11-17 10:54:57 +0200 (Tue, 17 Nov 2009) | 7 lines branches/5.0: Merge/Port fix for bug #46000 from branches/5.1 -r5895 to branches/5.0. Disallow creating index with the name of "GEN_CLUST_INDEX" which is reserved for the default system primary index. Minor adjusts on table name screening format for added tests.
34 lines
1 KiB
Text
34 lines
1 KiB
Text
# 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.
|
|
--error ER_CANT_CREATE_TABLE
|
|
create table bug46000(`id` int,key `GEN_CLUST_INDEX`(`id`))engine=innodb;
|
|
|
|
# Mixed upper/lower case of the reserved key words
|
|
--error ER_CANT_CREATE_TABLE
|
|
create table bug46000(`id` int, key `GEN_clust_INDEX`(`id`))engine=innodb;
|
|
|
|
show warnings;
|
|
|
|
create table bug46000(id int) engine=innodb;
|
|
|
|
# This 'create index' operation should fail.
|
|
--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
|
--error ER_CANT_CREATE_TABLE
|
|
create index GEN_CLUST_INDEX on bug46000(id);
|
|
|
|
--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
|
show warnings;
|
|
|
|
# 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;
|