######### # SETUP # ######### # Stop the running the server # Copy and unzip the datadir. # Restart the server against the unzipped datadir # restart: --datadir=DATADIR --innodb-page-size=16k ############################################## # Test instant ADD/DROP COLUMN for REDUNDANT format ############################################## # ------------------------------------------------------------ # Start server with old datadir with # table t1_redundant having # c1, c2 normal columns # c3 INSTANT ADD column with default def_c3. # c4 INSTANT ADD column with default def_c4. # +------+------+--------+--------+ # | c1 | c2 | c3 | c4 | # +------+------+--------+--------+ # | r1c1 | r1c2 | c3_def | c4_def | # | r2c1 | r2c2 | r2c3 | c4_def | # | r3c1 | r3c2 | r3c3 | r3c4 | # +------+------+--------+--------+ # # table t2_redundant having # c1, c2 normal columns # c3 INSTANT ADD column with default def_c3. # +------+------+--------+ # | c1 | c2 | c3 | # +------+------+--------+ # | r1c1 | r1c2 | c3_def | # | r2c1 | r2c2 | r2c3 | # +------+------+--------+ # ------------------------------------------------------------ SHOW CREATE TABLE t1_redundant; Table Create Table t1_redundant CREATE TABLE `t1_redundant` ( `c1` char(10) DEFAULT NULL, `c2` char(10) DEFAULT NULL, `c3` char(10) DEFAULT 'c3_def', `c4` char(10) DEFAULT 'c4_def' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=REDUNDANT # ------------------------------------------------------------ # Read rows from upgraded table t1_redundant # ------------------------------------------------------------ # Metadata from INFORMATION_SCHEMA.TABLES NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS test/t1_redundant 7 2 0 # Metadata from INFORMATION_SCHEMA.COLUMNS NAME POS MTYPE PRTYPE HAS_DEFAULT c1 0 13 16711934 0 c2 1 13 16711934 0 c3 2 13 16711934 1 c4 3 13 16711934 1 SELECT * FROM t1_redundant ORDER BY c1; c1 c2 c3 c4 r1c1 r1c2 c3_def c4_def r2c1 r2c2 r2c3 c4_def r3c1 r3c2 r3c3 r3c4 # ------------------------------------------------------------ # Insert a row in upgraded table t1_redundant # ------------------------------------------------------------ INSERT INTO t1_redundant values ("r4c1", "r4c2", "r4c3", "r4c4"); SELECT * FROM t1_redundant ORDER BY c1; c1 c2 c3 c4 r1c1 r1c2 c3_def c4_def r2c1 r2c2 r2c3 c4_def r3c1 r3c2 r3c3 r3c4 r4c1 r4c2 r4c3 r4c4 # ------------------------------------------------------------ # UPDATE : IN PLACE for row with no version # ------------------------------------------------------------ UPDATE t1_redundant SET c2="temp" where c1="r1c1"; SELECT * FROM t1_redundant ORDER BY c1; c1 c2 c3 c4 r1c1 temp c3_def c4_def r2c1 r2c2 r2c3 c4_def r3c1 r3c2 r3c3 r3c4 r4c1 r4c2 r4c3 r4c4 # ------------------------------------------------------------ # UPDATE : IN PLACE for row with V1 # ------------------------------------------------------------ UPDATE t1_redundant SET c2="temp" where c1="r2c1"; SELECT * FROM t1_redundant ORDER BY c1; c1 c2 c3 c4 r1c1 temp c3_def c4_def r2c1 temp r2c3 c4_def r3c1 r3c2 r3c3 r3c4 r4c1 r4c2 r4c3 r4c4 # ------------------------------------------------------------ # UPDATE : NOT IN PLACE for row with no version # ------------------------------------------------------------ UPDATE t1_redundant SET c3="r1c3" where c1="r1c1"; SELECT * FROM t1_redundant ORDER BY c1; c1 c2 c3 c4 r1c1 temp r1c3 c4_def r2c1 temp r2c3 c4_def r3c1 r3c2 r3c3 r3c4 r4c1 r4c2 r4c3 r4c4 # ------------------------------------------------------------ # UPDATE : NOT IN PLACE for row with V1 # ------------------------------------------------------------ UPDATE t1_redundant SET c4="r2c4" where c1="r2c1"; SELECT * FROM t1_redundant ORDER BY c1; c1 c2 c3 c4 r1c1 temp r1c3 c4_def r2c1 temp r2c3 r2c4 r3c1 r3c2 r3c3 r3c4 r4c1 r4c2 r4c3 r4c4 # ------------------------------------------------------------ # INSTANT DROP c2 # ------------------------------------------------------------ ALTER TABLE t1_redundant DROP COLUMN c2, ALGORITHM=INSTANT; # Metadata from INFORMATION_SCHEMA.TABLES NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS test/t1_redundant 6 2 1 # Metadata from INFORMATION_SCHEMA.COLUMNS NAME POS MTYPE PRTYPE HAS_DEFAULT c1 0 13 16711934 0 c3 1 13 16711934 1 c4 2 13 16711934 1 SELECT * FROM t1_redundant ORDER BY c1; c1 c3 c4 r1c1 r1c3 c4_def r2c1 r2c3 r2c4 r3c1 r3c3 r3c4 r4c1 r4c3 r4c4 INSERT INTO t1_redundant values ("r5c1", "r5c3", "r5c4"); SELECT * FROM t1_redundant ORDER BY c1; c1 c3 c4 r1c1 r1c3 c4_def r2c1 r2c3 r2c4 r3c1 r3c3 r3c4 r4c1 r4c3 r4c4 r5c1 r5c3 r5c4 # ------------------------------------------------------------ # INSTANT ADD c5 at the end # ------------------------------------------------------------ ALTER TABLE t1_redundant ADD COLUMN c5 char(10) default "c5_def", ALGORITHM=INSTANT; # Metadata from INFORMATION_SCHEMA.TABLES NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS test/t1_redundant 7 2 2 # Metadata from INFORMATION_SCHEMA.COLUMNS NAME POS MTYPE PRTYPE HAS_DEFAULT c1 0 13 16711934 0 c3 1 13 16711934 1 c4 2 13 16711934 1 c5 3 13 16711934 1 SELECT * FROM t1_redundant ORDER BY c1; c1 c3 c4 c5 r1c1 r1c3 c4_def c5_def r2c1 r2c3 r2c4 c5_def r3c1 r3c3 r3c4 c5_def r4c1 r4c3 r4c4 c5_def r5c1 r5c3 r5c4 c5_def INSERT INTO t1_redundant values ("r6c1", "r6c3", "r6c4", "r6c5"); SELECT * FROM t1_redundant ORDER BY c1; c1 c3 c4 c5 r1c1 r1c3 c4_def c5_def r2c1 r2c3 r2c4 c5_def r3c1 r3c3 r3c4 c5_def r4c1 r4c3 r4c4 c5_def r5c1 r5c3 r5c4 c5_def r6c1 r6c3 r6c4 r6c5 # ------------------------------------------------------------ # INSTANT ADD c6 somewhere in between # ------------------------------------------------------------ ALTER TABLE t1_redundant ADD COLUMN c6 char(10) default "c6_def" after c1, ALGORITHM=INSTANT; # Metadata from INFORMATION_SCHEMA.TABLES NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS test/t1_redundant 8 2 3 # Metadata from INFORMATION_SCHEMA.COLUMNS NAME POS MTYPE PRTYPE HAS_DEFAULT c1 0 13 16711934 0 c6 1 13 16711934 1 c3 2 13 16711934 1 c4 3 13 16711934 1 c5 4 13 16711934 1 SELECT * FROM t1_redundant ORDER BY c1; c1 c6 c3 c4 c5 r1c1 c6_def r1c3 c4_def c5_def r2c1 c6_def r2c3 r2c4 c5_def r3c1 c6_def r3c3 r3c4 c5_def r4c1 c6_def r4c3 r4c4 c5_def r5c1 c6_def r5c3 r5c4 c5_def r6c1 c6_def r6c3 r6c4 r6c5 INSERT INTO t1_redundant values ("r7c1", "r7c6", "r7c3", "r7c4", "r7c5"); SELECT * FROM t1_redundant ORDER BY c1; c1 c6 c3 c4 c5 r1c1 c6_def r1c3 c4_def c5_def r2c1 c6_def r2c3 r2c4 c5_def r3c1 c6_def r3c3 r3c4 c5_def r4c1 c6_def r4c3 r4c4 c5_def r5c1 c6_def r5c3 r5c4 c5_def r6c1 c6_def r6c3 r6c4 r6c5 r7c1 r7c6 r7c3 r7c4 r7c5 DROP TABLE t1_redundant; ############################################ # Test instant ADD/DROP COLUMN for DYNAMIC format ############################################ # ------------------------------------------------------------ # Start server with old datadir with # table t1_dynamic having # c1, c2 normal columns # c3 INSTANT ADD column with default def_c3. # c4 INSTANT ADD column with default def_c4. # +------+------+--------+--------+ # | c1 | c2 | c3 | c4 | # +------+------+--------+--------+ # | r1c1 | r1c2 | c3_def | c4_def | # | r2c1 | r2c2 | r2c3 | c4_def | # | r3c1 | r3c2 | r3c3 | r3c4 | # +------+------+--------+--------+ # # table t2_dynamic having # c1, c2 normal columns # c3 INSTANT ADD column with default def_c3. # +------+------+--------+ # | c1 | c2 | c3 | # +------+------+--------+ # | r1c1 | r1c2 | c3_def | # | r2c1 | r2c2 | r2c3 | # +------+------+--------+ # ------------------------------------------------------------ SHOW CREATE TABLE t1_dynamic; Table Create Table t1_dynamic CREATE TABLE `t1_dynamic` ( `c1` char(10) DEFAULT NULL, `c2` char(10) DEFAULT NULL, `c3` char(10) DEFAULT 'c3_def', `c4` char(10) DEFAULT 'c4_def' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC # ------------------------------------------------------------ # Read rows from upgraded table t1_dynamic # ------------------------------------------------------------ # Metadata from INFORMATION_SCHEMA.TABLES NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS test/t1_dynamic 7 2 0 # Metadata from INFORMATION_SCHEMA.COLUMNS NAME POS MTYPE PRTYPE HAS_DEFAULT c1 0 13 16711934 0 c2 1 13 16711934 0 c3 2 13 16711934 1 c4 3 13 16711934 1 SELECT * FROM t1_dynamic ORDER BY c1; c1 c2 c3 c4 r1c1 r1c2 c3_def c4_def r2c1 r2c2 r2c3 c4_def r3c1 r3c2 r3c3 r3c4 # ------------------------------------------------------------ # Insert a row in upgraded table t1_dynamic # ------------------------------------------------------------ INSERT INTO t1_dynamic values ("r4c1", "r4c2", "r4c3", "r4c4"); SELECT * FROM t1_dynamic ORDER BY c1; c1 c2 c3 c4 r1c1 r1c2 c3_def c4_def r2c1 r2c2 r2c3 c4_def r3c1 r3c2 r3c3 r3c4 r4c1 r4c2 r4c3 r4c4 # ------------------------------------------------------------ # UPDATE : IN PLACE for row with no version # ------------------------------------------------------------ UPDATE t1_dynamic SET c2="temp" where c1="r1c1"; SELECT * FROM t1_dynamic ORDER BY c1; c1 c2 c3 c4 r1c1 temp c3_def c4_def r2c1 r2c2 r2c3 c4_def r3c1 r3c2 r3c3 r3c4 r4c1 r4c2 r4c3 r4c4 # ------------------------------------------------------------ # UPDATE : IN PLACE for row with V1 # ------------------------------------------------------------ UPDATE t1_dynamic SET c2="temp" where c1="r2c1"; SELECT * FROM t1_dynamic ORDER BY c1; c1 c2 c3 c4 r1c1 temp c3_def c4_def r2c1 temp r2c3 c4_def r3c1 r3c2 r3c3 r3c4 r4c1 r4c2 r4c3 r4c4 # ------------------------------------------------------------ # UPDATE : NOT IN PLACE for row with no version # ------------------------------------------------------------ UPDATE t1_dynamic SET c3="r1c3" where c1="r1c1"; SELECT * FROM t1_dynamic ORDER BY c1; c1 c2 c3 c4 r1c1 temp r1c3 c4_def r2c1 temp r2c3 c4_def r3c1 r3c2 r3c3 r3c4 r4c1 r4c2 r4c3 r4c4 # ------------------------------------------------------------ # UPDATE : NOT IN PLACE for row with V1 # ------------------------------------------------------------ UPDATE t1_dynamic SET c4="r2c4" where c1="r2c1"; SELECT * FROM t1_dynamic ORDER BY c1; c1 c2 c3 c4 r1c1 temp r1c3 c4_def r2c1 temp r2c3 r2c4 r3c1 r3c2 r3c3 r3c4 r4c1 r4c2 r4c3 r4c4 # ------------------------------------------------------------ # INSTANT DROP c2 # ------------------------------------------------------------ ALTER TABLE t1_dynamic DROP COLUMN c2, ALGORITHM=INSTANT; # Metadata from INFORMATION_SCHEMA.TABLES NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS test/t1_dynamic 6 2 1 # Metadata from INFORMATION_SCHEMA.COLUMNS NAME POS MTYPE PRTYPE HAS_DEFAULT c1 0 13 16711934 0 c3 1 13 16711934 1 c4 2 13 16711934 1 SELECT * FROM t1_dynamic ORDER BY c1; c1 c3 c4 r1c1 r1c3 c4_def r2c1 r2c3 r2c4 r3c1 r3c3 r3c4 r4c1 r4c3 r4c4 INSERT INTO t1_dynamic values ("r5c1", "r5c3", "r5c4"); SELECT * FROM t1_dynamic ORDER BY c1; c1 c3 c4 r1c1 r1c3 c4_def r2c1 r2c3 r2c4 r3c1 r3c3 r3c4 r4c1 r4c3 r4c4 r5c1 r5c3 r5c4 # ------------------------------------------------------------ # INSTANT ADD c5 at the end # ------------------------------------------------------------ ALTER TABLE t1_dynamic ADD COLUMN c5 char(10) default "c5_def", ALGORITHM=INSTANT; # Metadata from INFORMATION_SCHEMA.TABLES NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS test/t1_dynamic 7 2 2 # Metadata from INFORMATION_SCHEMA.COLUMNS NAME POS MTYPE PRTYPE HAS_DEFAULT c1 0 13 16711934 0 c3 1 13 16711934 1 c4 2 13 16711934 1 c5 3 13 16711934 1 SELECT * FROM t1_dynamic ORDER BY c1; c1 c3 c4 c5 r1c1 r1c3 c4_def c5_def r2c1 r2c3 r2c4 c5_def r3c1 r3c3 r3c4 c5_def r4c1 r4c3 r4c4 c5_def r5c1 r5c3 r5c4 c5_def INSERT INTO t1_dynamic values ("r6c1", "r6c3", "r6c4", "r6c5"); SELECT * FROM t1_dynamic ORDER BY c1; c1 c3 c4 c5 r1c1 r1c3 c4_def c5_def r2c1 r2c3 r2c4 c5_def r3c1 r3c3 r3c4 c5_def r4c1 r4c3 r4c4 c5_def r5c1 r5c3 r5c4 c5_def r6c1 r6c3 r6c4 r6c5 # ------------------------------------------------------------ # INSTANT ADD c6 somewhere in between # ------------------------------------------------------------ ALTER TABLE t1_dynamic ADD COLUMN c6 char(10) default "c6_def" after c1, ALGORITHM=INSTANT; # Metadata from INFORMATION_SCHEMA.TABLES NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS test/t1_dynamic 8 2 3 # Metadata from INFORMATION_SCHEMA.COLUMNS NAME POS MTYPE PRTYPE HAS_DEFAULT c1 0 13 16711934 0 c6 1 13 16711934 1 c3 2 13 16711934 1 c4 3 13 16711934 1 c5 4 13 16711934 1 SELECT * FROM t1_dynamic ORDER BY c1; c1 c6 c3 c4 c5 r1c1 c6_def r1c3 c4_def c5_def r2c1 c6_def r2c3 r2c4 c5_def r3c1 c6_def r3c3 r3c4 c5_def r4c1 c6_def r4c3 r4c4 c5_def r5c1 c6_def r5c3 r5c4 c5_def r6c1 c6_def r6c3 r6c4 r6c5 INSERT INTO t1_dynamic values ("r7c1", "r7c6", "r7c3", "r7c4", "r7c5"); SELECT * FROM t1_dynamic ORDER BY c1; c1 c6 c3 c4 c5 r1c1 c6_def r1c3 c4_def c5_def r2c1 c6_def r2c3 r2c4 c5_def r3c1 c6_def r3c3 r3c4 c5_def r4c1 c6_def r4c3 r4c4 c5_def r5c1 c6_def r5c3 r5c4 c5_def r6c1 c6_def r6c3 r6c4 r6c5 r7c1 r7c6 r7c3 r7c4 r7c5 DROP TABLE t1_dynamic; ############################################ # Test instant ADD/DROP COLUMN for COMPACT format ############################################ # ------------------------------------------------------------ # Start server with old datadir with # table t1_compact having # c1, c2 normal columns # c3 INSTANT ADD column with default def_c3. # c4 INSTANT ADD column with default def_c4. # +------+------+--------+--------+ # | c1 | c2 | c3 | c4 | # +------+------+--------+--------+ # | r1c1 | r1c2 | c3_def | c4_def | # | r2c1 | r2c2 | r2c3 | c4_def | # | r3c1 | r3c2 | r3c3 | r3c4 | # +------+------+--------+--------+ # # table t2_compact having # c1, c2 normal columns # c3 INSTANT ADD column with default def_c3. # +------+------+--------+ # | c1 | c2 | c3 | # +------+------+--------+ # | r1c1 | r1c2 | c3_def | # | r2c1 | r2c2 | r2c3 | # +------+------+--------+ # ------------------------------------------------------------ SHOW CREATE TABLE t1_compact; Table Create Table t1_compact CREATE TABLE `t1_compact` ( `c1` char(10) DEFAULT NULL, `c2` char(10) DEFAULT NULL, `c3` char(10) DEFAULT 'c3_def', `c4` char(10) DEFAULT 'c4_def' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT # ------------------------------------------------------------ # Read rows from upgraded table t1_compact # ------------------------------------------------------------ # Metadata from INFORMATION_SCHEMA.TABLES NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS test/t1_compact 7 2 0 # Metadata from INFORMATION_SCHEMA.COLUMNS NAME POS MTYPE PRTYPE HAS_DEFAULT c1 0 13 16711934 0 c2 1 13 16711934 0 c3 2 13 16711934 1 c4 3 13 16711934 1 SELECT * FROM t1_compact ORDER BY c1; c1 c2 c3 c4 r1c1 r1c2 c3_def c4_def r2c1 r2c2 r2c3 c4_def r3c1 r3c2 r3c3 r3c4 # ------------------------------------------------------------ # Insert a row in upgraded table t1_compact # ------------------------------------------------------------ INSERT INTO t1_compact values ("r4c1", "r4c2", "r4c3", "r4c4"); SELECT * FROM t1_compact ORDER BY c1; c1 c2 c3 c4 r1c1 r1c2 c3_def c4_def r2c1 r2c2 r2c3 c4_def r3c1 r3c2 r3c3 r3c4 r4c1 r4c2 r4c3 r4c4 # ------------------------------------------------------------ # UPDATE : IN PLACE for row with no version # ------------------------------------------------------------ UPDATE t1_compact SET c2="temp" where c1="r1c1"; SELECT * FROM t1_compact ORDER BY c1; c1 c2 c3 c4 r1c1 temp c3_def c4_def r2c1 r2c2 r2c3 c4_def r3c1 r3c2 r3c3 r3c4 r4c1 r4c2 r4c3 r4c4 # ------------------------------------------------------------ # UPDATE : IN PLACE for row with V1 # ------------------------------------------------------------ UPDATE t1_compact SET c2="temp" where c1="r2c1"; SELECT * FROM t1_compact ORDER BY c1; c1 c2 c3 c4 r1c1 temp c3_def c4_def r2c1 temp r2c3 c4_def r3c1 r3c2 r3c3 r3c4 r4c1 r4c2 r4c3 r4c4 # ------------------------------------------------------------ # UPDATE : NOT IN PLACE for row with no version # ------------------------------------------------------------ UPDATE t1_compact SET c3="r1c3" where c1="r1c1"; SELECT * FROM t1_compact ORDER BY c1; c1 c2 c3 c4 r1c1 temp r1c3 c4_def r2c1 temp r2c3 c4_def r3c1 r3c2 r3c3 r3c4 r4c1 r4c2 r4c3 r4c4 # ------------------------------------------------------------ # UPDATE : NOT IN PLACE for row with V1 # ------------------------------------------------------------ UPDATE t1_compact SET c4="r2c4" where c1="r2c1"; SELECT * FROM t1_compact ORDER BY c1; c1 c2 c3 c4 r1c1 temp r1c3 c4_def r2c1 temp r2c3 r2c4 r3c1 r3c2 r3c3 r3c4 r4c1 r4c2 r4c3 r4c4 # ------------------------------------------------------------ # INSTANT DROP c2 # ------------------------------------------------------------ ALTER TABLE t1_compact DROP COLUMN c2, ALGORITHM=INSTANT; # Metadata from INFORMATION_SCHEMA.TABLES NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS test/t1_compact 6 2 1 # Metadata from INFORMATION_SCHEMA.COLUMNS NAME POS MTYPE PRTYPE HAS_DEFAULT c1 0 13 16711934 0 c3 1 13 16711934 1 c4 2 13 16711934 1 SELECT * FROM t1_compact ORDER BY c1; c1 c3 c4 r1c1 r1c3 c4_def r2c1 r2c3 r2c4 r3c1 r3c3 r3c4 r4c1 r4c3 r4c4 INSERT INTO t1_compact values ("r5c1", "r5c3", "r5c4"); SELECT * FROM t1_compact ORDER BY c1; c1 c3 c4 r1c1 r1c3 c4_def r2c1 r2c3 r2c4 r3c1 r3c3 r3c4 r4c1 r4c3 r4c4 r5c1 r5c3 r5c4 # ------------------------------------------------------------ # INSTANT ADD c5 at the end # ------------------------------------------------------------ ALTER TABLE t1_compact ADD COLUMN c5 char(10) default "c5_def", ALGORITHM=INSTANT; # Metadata from INFORMATION_SCHEMA.TABLES NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS test/t1_compact 7 2 2 # Metadata from INFORMATION_SCHEMA.COLUMNS NAME POS MTYPE PRTYPE HAS_DEFAULT c1 0 13 16711934 0 c3 1 13 16711934 1 c4 2 13 16711934 1 c5 3 13 16711934 1 SELECT * FROM t1_compact ORDER BY c1; c1 c3 c4 c5 r1c1 r1c3 c4_def c5_def r2c1 r2c3 r2c4 c5_def r3c1 r3c3 r3c4 c5_def r4c1 r4c3 r4c4 c5_def r5c1 r5c3 r5c4 c5_def INSERT INTO t1_compact values ("r6c1", "r6c3", "r6c4", "r6c5"); SELECT * FROM t1_compact ORDER BY c1; c1 c3 c4 c5 r1c1 r1c3 c4_def c5_def r2c1 r2c3 r2c4 c5_def r3c1 r3c3 r3c4 c5_def r4c1 r4c3 r4c4 c5_def r5c1 r5c3 r5c4 c5_def r6c1 r6c3 r6c4 r6c5 # ------------------------------------------------------------ # INSTANT ADD c6 somewhere in between # ------------------------------------------------------------ ALTER TABLE t1_compact ADD COLUMN c6 char(10) default "c6_def" after c1, ALGORITHM=INSTANT; # Metadata from INFORMATION_SCHEMA.TABLES NAME N_COLS INSTANT_COLS TOTAL_ROW_VERSIONS test/t1_compact 8 2 3 # Metadata from INFORMATION_SCHEMA.COLUMNS NAME POS MTYPE PRTYPE HAS_DEFAULT c1 0 13 16711934 0 c6 1 13 16711934 1 c3 2 13 16711934 1 c4 3 13 16711934 1 c5 4 13 16711934 1 SELECT * FROM t1_compact ORDER BY c1; c1 c6 c3 c4 c5 r1c1 c6_def r1c3 c4_def c5_def r2c1 c6_def r2c3 r2c4 c5_def r3c1 c6_def r3c3 r3c4 c5_def r4c1 c6_def r4c3 r4c4 c5_def r5c1 c6_def r5c3 r5c4 c5_def r6c1 c6_def r6c3 r6c4 r6c5 INSERT INTO t1_compact values ("r7c1", "r7c6", "r7c3", "r7c4", "r7c5"); SELECT * FROM t1_compact ORDER BY c1; c1 c6 c3 c4 c5 r1c1 c6_def r1c3 c4_def c5_def r2c1 c6_def r2c3 r2c4 c5_def r3c1 c6_def r3c3 r3c4 c5_def r4c1 c6_def r4c3 r4c4 c5_def r5c1 c6_def r5c3 r5c4 c5_def r6c1 c6_def r6c3 r6c4 r6c5 r7c1 r7c6 r7c3 r7c4 r7c5 DROP TABLE t1_compact; ########### # CLEANUP # ########### # Shutdown server # Remove copied files # Restarting server to restore server state # restart