mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +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
@ -236,8 +236,7 @@ WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
|
||||
connection con1;
|
||||
SET DEBUG_SYNC = 'row_log_apply_before SIGNAL c2e_created WAIT_FOR dml2_done';
|
||||
SET lock_wait_timeout = 10;
|
||||
ALTER TABLE t1 DROP INDEX c2d, ADD INDEX c2e(c2),
|
||||
ALGORITHM = INPLACE;
|
||||
ALTER TABLE t1 CHANGE c2 c22 INT, DROP INDEX c2d, ADD INDEX c2e(c22, c3(10)), ALGORITHM = NOCOPY;
|
||||
connection default;
|
||||
INSERT INTO t1 SELECT 80 + c1, c2, c3 FROM t1;
|
||||
INSERT INTO t1 SELECT 160 + c1, c2, c3 FROM t1;
|
||||
@ -295,6 +294,7 @@ INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_FIELDS sf
|
||||
ON si.index_id = sf.index_id WHERE si.name = '?c2e';
|
||||
name pos
|
||||
c2 0
|
||||
c3 1
|
||||
SET @merge_encrypt_1=
|
||||
(SELECT variable_value FROM information_schema.global_status
|
||||
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
|
||||
|
Reference in New Issue
Block a user