mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
3a3d5ba235
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
31 lines
734 B
Text
31 lines
734 B
Text
--source include/have_debug.inc
|
|
--source include/have_debug_sync.inc
|
|
--source include/have_innodb.inc
|
|
--source include/count_sessions.inc
|
|
|
|
CREATE TABLE t1 (x INT NOT NULL UNIQUE KEY) ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES(5);
|
|
|
|
SET GLOBAL innodb_log_checkpoint_now=TRUE;
|
|
|
|
# Start an ALTER TABLE and stop it before renaming the files
|
|
SET DEBUG_SYNC='commit_cache_rebuild SIGNAL ready WAIT_FOR finish';
|
|
|
|
--send 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;
|
|
reap;
|
|
SHOW CREATE TABLE t1;
|
|
DROP TABLE t1;
|
|
SET DEBUG_SYNC='RESET';
|
|
|
|
--source include/wait_until_count_sessions.inc
|