mirror of
https://github.com/MariaDB/server.git
synced 2025-08-17 06:42:17 +03:00
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
20 lines
593 B
Plaintext
20 lines
593 B
Plaintext
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 FORCE;;
|
|
connect con1,localhost,root,,;
|
|
SET DEBUG_SYNC='now WAIT_FOR ready';
|
|
SET GLOBAL innodb_log_checkpoint_now=TRUE;
|
|
SET DEBUG_SYNC='now SIGNAL finish';
|
|
disconnect con1;
|
|
connection default;
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`x` int(11) NOT NULL,
|
|
UNIQUE KEY `x` (`x`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
DROP TABLE t1;
|
|
SET DEBUG_SYNC='RESET';
|