mirror of
https://github.com/MariaDB/server.git
synced 2025-05-25 13:42:52 +03:00
Introduced new alter algorithm type called NOCOPY & INSTANT for inplace alter operation. NOCOPY - Algorithm refuses any alter operation that would rebuild the clustered index. It is a subset of INPLACE algorithm. INSTANT - Algorithm allow any alter operation that would modify only meta data. It is a subset of NOCOPY algorithm. Introduce new variable called alter_algorithm. The values are DEFAULT(0), COPY(1), INPLACE(2), NOCOPY(3), INSTANT(4) Message to deprecate old_alter_table variable and make it alias for alter_algorithm variable. alter_algorithm variable for slave is always set to default.
69 lines
2.4 KiB
Plaintext
69 lines
2.4 KiB
Plaintext
|
|
#
|
|
# 2010-01-20 OBN - added check of I_S values after variable value changed
|
|
#
|
|
|
|
SET @start_global_value = @@global.old_alter_table;
|
|
SELECT @start_global_value;
|
|
|
|
#
|
|
# exists as global and session
|
|
#
|
|
select @@global.old_alter_table;
|
|
select @@session.old_alter_table;
|
|
show global variables like 'old_alter_table';
|
|
show session variables like 'old_alter_table';
|
|
select * from information_schema.global_variables where variable_name='old_alter_table';
|
|
select * from information_schema.session_variables where variable_name='old_alter_table';
|
|
|
|
#
|
|
# show that it's writable
|
|
#
|
|
set global old_alter_table=1;
|
|
set session old_alter_table=1;
|
|
select @@global.old_alter_table;
|
|
select @@session.old_alter_table;
|
|
show global variables like 'old_alter_table';
|
|
show session variables like 'old_alter_table';
|
|
select * from information_schema.global_variables where variable_name='old_alter_table';
|
|
select * from information_schema.session_variables where variable_name='old_alter_table';
|
|
|
|
set global old_alter_table=2;
|
|
set session old_alter_table=2;
|
|
select @@global.old_alter_table;
|
|
select @@session.old_alter_table;
|
|
show global variables like 'old_alter_table';
|
|
show session variables like 'old_alter_table';
|
|
select * from information_schema.global_variables where variable_name='old_alter_table';
|
|
select * from information_schema.session_variables where variable_name='old_alter_table';
|
|
|
|
set global old_alter_table=3;
|
|
set session old_alter_table=3;
|
|
select @@global.old_alter_table;
|
|
select @@session.old_alter_table;
|
|
show global variables like 'old_alter_table';
|
|
show session variables like 'old_alter_table';
|
|
select * from information_schema.global_variables where variable_name='old_alter_table';
|
|
select * from information_schema.session_variables where variable_name='old_alter_table';
|
|
|
|
set global old_alter_table=4;
|
|
set session old_alter_table=4;
|
|
select @@global.old_alter_table;
|
|
select @@session.old_alter_table;
|
|
show global variables like 'old_alter_table';
|
|
show session variables like 'old_alter_table';
|
|
select * from information_schema.global_variables where variable_name='old_alter_table';
|
|
select * from information_schema.session_variables where variable_name='old_alter_table';
|
|
#
|
|
# incorrect types
|
|
#
|
|
--error ER_WRONG_TYPE_FOR_VAR
|
|
set global old_alter_table=1.1;
|
|
--error ER_WRONG_TYPE_FOR_VAR
|
|
set global old_alter_table=1e1;
|
|
--error ER_WRONG_VALUE_FOR_VAR
|
|
set global old_alter_table="foo";
|
|
|
|
SET @@global.old_alter_table = @start_global_value;
|
|
SELECT @@global.old_alter_table;
|