mirror of
https://github.com/MariaDB/server.git
synced 2025-07-26 07:02:12 +03:00
Remove alter_algorithm but keep the variable as no-op (with a warning). The reasons for removing alter_algorithm are: - alter_algorithm was introduced as a replacement for the old_alter_table that was used to force the usage of the original alter table algorithm (copy) in the cases where the new alter algorithm did not work. The new option was added as a way to force the usage of a specific algorithm when it should instead have made it possible to disable algorithms that would not work for some reason. - alter_algorithm introduced some cases where ALTER TABLE would not work without specifying the ALGORITHM=XXX option together with ALTER TABLE. - Having different values of alter_algorithm on master and slave could cause slave to stop unexpectedly. - ALTER TABLE FORCE, as used by mariadb-upgrade, would not always work if alter_algorithm was set for the server. - As part of the MDEV-33449 "improving repair of tables" it become clear that alter- algorithm made it harder to provide a better and more consistent ALTER TABLE FORCE and REPAIR TABLE and it would be better to remove it.
22 lines
787 B
Plaintext
22 lines
787 B
Plaintext
SET @start_global_value = @@global.alter_algorithm;
|
|
SELECT @@global.alter_algorithm;
|
|
@@global.alter_algorithm
|
|
DEFAULT
|
|
SET GLOBAL alter_algorithm=2;
|
|
Warnings:
|
|
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
|
|
SELECT @@global.alter_algorithm;
|
|
@@global.alter_algorithm
|
|
DEFAULT
|
|
SET GLOBAL alter_algorithm=5;
|
|
ERROR 42000: Variable 'alter_algorithm' can't be set to the value of '5'
|
|
SELECT @@global.alter_algorithm;
|
|
@@global.alter_algorithm
|
|
DEFAULT
|
|
SET SESSION alter_algorithm=INSTANT;
|
|
Warnings:
|
|
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
|
|
SHOW SESSION VARIABLES LIKE 'alter_algorithm';
|
|
Variable_name Value
|
|
alter_algorithm DEFAULT
|