1CREATE TABLE t1 (a INT)ENGINE=InnoDB; 2INSERT INTO t1 VALUES(1); 3SET alter_algorithm='INPLACE'; 4affected rows: 0 5PREPARE stmt FROM 'ALTER TABLE t1 ADD KEY idx(a)'; 6affected rows: 0 7info: Statement prepared 8PREPARE stmt1 FROM 'ALTER TABLE t1 DROP KEY idx'; 9affected rows: 0 10info: Statement prepared 11CREATE OR REPLACE PROCEDURE p1() 12BEGIN 13ALTER TABLE t1 ADD KEY idx2(a); 14END| 15affected rows: 0 16CREATE OR REPLACE PROCEDURE p2() 17BEGIN 18ALTER TABLE t1 DROP KEY idx2; 19END| 20affected rows: 0 21SET alter_algorithm='COPY'; 22affected rows: 0 23EXECUTE stmt; 24affected rows: 1 25info: Records: 1 Duplicates: 0 Warnings: 0 26EXECUTE stmt1; 27affected rows: 1 28info: Records: 1 Duplicates: 0 Warnings: 0 29call p1(); 30affected rows: 1 31call p2(); 32affected rows: 1 33SET alter_algorithm='NOCOPY'; 34affected rows: 0 35EXECUTE stmt; 36affected rows: 0 37info: Records: 0 Duplicates: 0 Warnings: 0 38EXECUTE stmt1; 39affected rows: 0 40info: Records: 0 Duplicates: 0 Warnings: 0 41call p1(); 42affected rows: 0 43call p2(); 44affected rows: 0 45SET alter_algorithm='INSTANT'; 46affected rows: 0 47EXECUTE stmt; 48ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: ADD INDEX. Try ALGORITHM=NOCOPY 49call p1(); 50ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: ADD INDEX. Try ALGORITHM=NOCOPY 51DROP TABLE t1; 52affected rows: 0 53DROP PROCEDURE p1; 54affected rows: 0 55DROP PROCEDURE p2; 56affected rows: 0 57CREATE TABLE t1(id INT PRIMARY KEY, 58col1 INT UNSIGNED NOT NULL UNIQUE)ENGINE=InnoDB; 59affected rows: 0 60INSERT INTO t1 VALUES(1,1),(2,2),(3,3); 61affected rows: 3 62info: Records: 3 Duplicates: 0 Warnings: 0 63SET ALTER_ALGORITHM=INSTANT; 64affected rows: 0 65ALTER TABLE t1 DROP COLUMN col1; 66ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE 67ALTER TABLE t1 DROP COLUMN col1, ALGORITHM=NOCOPY; 68ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE 69ALTER TABLE t1 DROP COLUMN col1, ALGORITHM=DEFAULT; 70affected rows: 0 71info: Records: 0 Duplicates: 0 Warnings: 0 72ALTER TABLE t1 DROP PRIMARY KEY, ALGORITHM=DEFAULT; 73affected rows: 3 74info: Records: 3 Duplicates: 0 Warnings: 0 75DROP TABLE t1; 76affected rows: 0 77