mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-13134 Introduce ALTER TABLE attributes ALGORITHM=NOCOPY and ALGORITHM=INSTANT
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.
This commit is contained in:
22
mysql-test/suite/innodb/t/alter_algorithm.test
Normal file
22
mysql-test/suite/innodb/t/alter_algorithm.test
Normal file
@ -0,0 +1,22 @@
|
||||
--source include/have_innodb.inc
|
||||
let $algorithm = `SELECT @@ALTER_ALGORITHM`;
|
||||
let $error_code = 0;
|
||||
|
||||
if ($algorithm == "NOCOPY") {
|
||||
let $error_code = ER_ALTER_OPERATION_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
if ($algorithm == "INSTANT") {
|
||||
let $error_code = ER_ALTER_OPERATION_NOT_SUPPORTED, ER_ALTER_OPERATION_NOT_SUPPORTED_REASON;
|
||||
}
|
||||
|
||||
--source include/alter_nocopy_fail.inc
|
||||
|
||||
if ($algorithm == "NOCOPY") {
|
||||
let $error_code = 0;
|
||||
}
|
||||
|
||||
if ($algorithm == "INSTANT") {
|
||||
let $error_code = ER_ALTER_OPERATION_NOT_SUPPORTED_REASON;
|
||||
}
|
||||
--source include/alter_nocopy.inc
|
Reference in New Issue
Block a user