--disable_warnings DROP TABLE IF EXISTS t1, t2, t3; --enable_warnings SET GLOBAL innodb_default_row_format= 'Compact'; CREATE TABLE t1 (c1 int NOT NULL, c2 int, PRIMARY KEY(c1)); CREATE TABLE t2 (c1 int NOT NULL, c2 int, PRIMARY KEY(c1)); CREATE TABLE t3 (c1 int NOT NULL, c2 int, PRIMARY KEY(c1)); SELECT TABLE_ID, NAME, ROW_FORMAT FROM information_schema.INNODB_SYS_TABLES WHERE NAME LIKE 'test/%'; SET GLOBAL innodb_default_row_format= 'Dynamic'; --echo "Add new column" ALTER TABLE t1 ADD c3 int; SELECT TABLE_ID, NAME, ROW_FORMAT FROM information_schema.INNODB_SYS_TABLES WHERE NAME= 'test/t1'; --echo "Add new index" ALTER TABLE t2 ADD KEY(c2); SELECT TABLE_ID, NAME, ROW_FORMAT FROM information_schema.INNODB_SYS_TABLES WHERE NAME= 'test/t2'; --echo "Add new index with Copying table" ALTER TABLE t3 ADD KEY(c2), ALGORITHM= COPY; SELECT TABLE_ID, NAME, ROW_FORMAT FROM information_schema.INNODB_SYS_TABLES WHERE NAME= 'test/t3'; SET GLOBAL innodb_default_row_format= default; DROP TABLE t1; DROP TABLE t2; DROP TABLE t3;