1CREATE TABLE abc(a int auto_increment PRIMARY KEY, b varchar(1024), c 2varchar(1024))ENGINE=INNODB; 3INSERT INTO abc (b,c) VALUES (repeat('b', 1024), repeat('c', 1024)); 4INSERT INTO abc (b,c) SELECT b,c FROM abc; 5INSERT INTO abc (b,c) SELECT b,c FROM abc; 6INSERT INTO abc (b,c) SELECT b,c FROM abc; 7INSERT INTO abc (b,c) SELECT b,c FROM abc; 8INSERT INTO abc (b,c) SELECT b,c FROM abc; 9INSERT INTO abc (b,c) SELECT b,c FROM abc; 10INSERT INTO abc (b,c) SELECT b,c FROM abc; 11INSERT INTO abc (b,c) SELECT b,c FROM abc; 12INSERT INTO abc (b,c) SELECT b,c FROM abc; 13INSERT INTO abc (b,c) SELECT b,c FROM abc; 14INSERT INTO abc (b,c) SELECT b,c FROM abc; 15INSERT INTO abc (b,c) SELECT b,c FROM abc; 16INSERT INTO abc (b,c) SELECT b,c FROM abc; 17INSERT INTO abc (b,c) SELECT b,c FROM abc; 18SELECT DATA_LENGTH, INDEX_LENGTH from information_schema.TABLES WHERE 19TABLE_SCHEMA = 'test' AND TABLE_NAME = 'abc'; 20DATA_LENGTH INDEX_LENGTH 21# 0 22ALTER TABLE abc add INDEX cc (c(800)); 23SELECT DATA_LENGTH, INDEX_LENGTH from information_schema.TABLES WHERE 24TABLE_SCHEMA = 'test' AND TABLE_NAME = 'abc'; 25DATA_LENGTH INDEX_LENGTH 26# 17809408 27ALTER TABLE abc add INDEX bb (b(800)); 28SELECT DATA_LENGTH, INDEX_LENGTH from information_schema.TABLES WHERE 29TABLE_SCHEMA = 'test' AND TABLE_NAME = 'abc'; 30DATA_LENGTH INDEX_LENGTH 31# 35618816 32DROP TABLE abc; 33