mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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:
@ -36,14 +36,7 @@ SELECT COUNT(*)>0 FROM INFORMATION_SCHEMA.COLUMNS
|
||||
LEFT JOIN t4 ON (NUMERIC_SCALE = pk);
|
||||
COUNT(*)>0
|
||||
1
|
||||
SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL enter WAIT_FOR delete';
|
||||
ALTER TABLE t4 ADD COLUMN c INT;
|
||||
connect dml,localhost,root,,;
|
||||
SET DEBUG_SYNC='now WAIT_FOR enter';
|
||||
DELETE FROM t4;
|
||||
InnoDB 0 transactions not purged
|
||||
SET DEBUG_SYNC='now SIGNAL delete';
|
||||
connection default;
|
||||
CREATE TABLE t5 (i INT, KEY(i)) ENGINE=InnoDB;
|
||||
INSERT INTO t5 VALUES (-42);
|
||||
ALTER TABLE t5 ADD UNIQUE ui(i);
|
||||
@ -61,7 +54,7 @@ INSERT INTO t8 VALUES (NULL);
|
||||
ALTER TABLE t8 ADD c CHAR(3);
|
||||
SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR dml';
|
||||
ALTER TABLE t8 FORCE;
|
||||
connection dml;
|
||||
connect dml,localhost,root,,;
|
||||
SET DEBUG_SYNC='now WAIT_FOR rebuilt';
|
||||
BEGIN;
|
||||
INSERT INTO t8 SET i=1;
|
||||
|
Reference in New Issue
Block a user