1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

branches/zip: ha_innobase:add_index(): Report HA_ERR_TABLE_EXIST when the

temporary table cannot be created or renamed.

innodb-index.test,result: Add test cases where a temporary table already
exists.
This commit is contained in:
marko
2007-09-05 11:27:41 +00:00
parent 84ff578142
commit ffe9a4c52e
3 changed files with 49 additions and 5 deletions

View File

@@ -46,6 +46,13 @@ t1 CREATE TABLE `t1` (
KEY `d2` (`d`),
KEY `b` (`b`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
CREATE TABLE `t1#1`(a INT PRIMARY KEY) ENGINE=InnoDB;
alter table t1 add unique index (c), add index (d);
ERROR HY000: Table 'test/t1@00231' already exists
rename table `t1#1` to `t1#2`;
alter table t1 add unique index (c), add index (d);
ERROR HY000: Table 'test/t1@00232' already exists
drop table `t1#2`;
alter table t1 add unique index (c), add index (d);
show create table t1;
Table Create Table