mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
branches/zip: Port bug #46000 related changes from 5.1 to zip
branch. Due to different code path for creating index in zip branch comparing to 5.1), the index reserved name check function is extended to be used in ha_innobase::add_index(). rb://190 Approved by: Marko
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
create table bug46000(`id` int,key `GEN_CLUST_INDEX`(`id`))engine=innodb;
|
||||
ERROR HY000: Can't create table 'test.bug46000' (errno: -1)
|
||||
ERROR 42000: Incorrect index name 'GEN_CLUST_INDEX'
|
||||
create table bug46000(`id` int, key `GEN_clust_INDEX`(`id`))engine=innodb;
|
||||
ERROR HY000: Can't create table 'test.bug46000' (errno: -1)
|
||||
show errors;
|
||||
ERROR 42000: Incorrect index name 'GEN_CLUST_INDEX'
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1005 Cannot Create Index with name 'GEN_CLUST_INDEX'. The name is reserved for the system default primary index.
|
||||
Warning 1280 Cannot Create Index with name 'GEN_CLUST_INDEX'. The name is reserved for the system default primary index.
|
||||
Error 1280 Incorrect index name 'GEN_CLUST_INDEX'
|
||||
Error 1005 Can't create table 'test.bug46000' (errno: -1)
|
||||
create table bug46000(id int) engine=innodb;
|
||||
create index GEN_CLUST_INDEX on bug46000(id);
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: -1)
|
||||
show errors;
|
||||
ERROR 42000: Incorrect index name 'GEN_CLUST_INDEX'
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1005 Cannot Create Index with name 'GEN_CLUST_INDEX'. The name is reserved for the system default primary index.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: -1)
|
||||
Warning 1280 Cannot Create Index with name 'GEN_CLUST_INDEX'. The name is reserved for the system default primary index.
|
||||
Error 1280 Incorrect index name 'GEN_CLUST_INDEX'
|
||||
Error 1030 Got error -1 from storage engine
|
||||
create index idx on bug46000(id);
|
||||
drop table bug46000;
|
||||
|
||||
@@ -7,24 +7,22 @@
|
||||
|
||||
# This 'create table' operation should fail because of
|
||||
# using the reserve name as its index name.
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
--error ER_WRONG_NAME_FOR_INDEX
|
||||
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
|
||||
--error ER_WRONG_NAME_FOR_INDEX
|
||||
create table bug46000(`id` int, key `GEN_clust_INDEX`(`id`))engine=innodb;
|
||||
|
||||
show errors;
|
||||
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
|
||||
--error ER_WRONG_NAME_FOR_INDEX
|
||||
create index GEN_CLUST_INDEX on bug46000(id);
|
||||
|
||||
--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
show errors;
|
||||
show warnings;
|
||||
|
||||
# This 'create index' operation should succeed, no
|
||||
# temp table left from last failed create index
|
||||
|
||||
Reference in New Issue
Block a user