mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / suite / innodb / t / innodb_bug46000.test
blobeb10d866e54a8a78dc28c15162caa7088ceb8566
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.
6 --source include/have_innodb.inc
8 # This 'create table' operation should fail because of
9 # using the reserve name as its index name.
10 --error ER_CANT_CREATE_TABLE
11 create table bug46000(`id` int,key `GEN_CLUST_INDEX`(`id`))engine=innodb;
13 # Mixed upper/lower case of the reserved key words
14 --error ER_CANT_CREATE_TABLE
15 create table bug46000(`id` int, key `GEN_clust_INDEX`(`id`))engine=innodb;
17 show warnings;
19 create table bug46000(id int) engine=innodb;
21 # This 'create index' operation should fail.
22 --replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/
23 --error ER_CANT_CREATE_TABLE
24 create index GEN_CLUST_INDEX on bug46000(id);
26 --replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/
27 show warnings;
29 # This 'create index' operation should succeed, no
30 # temp table left from last failed create index
31 # operation.
32 create index idx on bug46000(id);
34 drop table bug46000;