mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-13301 Optimize DROP INDEX, ADD INDEX into RENAME INDEX
Just rename index in data dictionary and in InnoDB cache when it's possible. Introduce ALTER_INDEX_RENAME for that purpose so that engines can optimize such operation. Unused code between macro MYSQL_RENAME_INDEX was removed. compare_keys_but_name(): compare index definitions except for index names Alter_inplace_info::rename_keys: ha_innobase_inplace_ctx::rename_keys: vector of rename indexes fill_alter_inplace_info():: fills Alter_inplace_info::rename_keys
This commit is contained in:
committed by
Sergei Golubchik
parent
5d8ca98997
commit
3a3d5ba235
@ -2,7 +2,7 @@ CREATE TABLE t1 (x INT NOT NULL UNIQUE KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(5);
|
||||
SET GLOBAL innodb_log_checkpoint_now=TRUE;
|
||||
SET DEBUG_SYNC='commit_cache_rebuild SIGNAL ready WAIT_FOR finish';
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(x);
|
||||
ALTER TABLE t1 FORCE;;
|
||||
connect con1,localhost,root,,;
|
||||
SET DEBUG_SYNC='now WAIT_FOR ready';
|
||||
SET GLOBAL innodb_log_checkpoint_now=TRUE;
|
||||
@ -13,7 +13,6 @@ SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`x` int(11) NOT NULL,
|
||||
PRIMARY KEY (`x`),
|
||||
UNIQUE KEY `x` (`x`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user