1--source include/have_innodb_16k.inc
2CREATE TABLE abc(a int auto_increment PRIMARY KEY, b varchar(1024), c
3varchar(1024))ENGINE=INNODB;
4INSERT INTO abc (b,c) VALUES (repeat('b', 1024), repeat('c', 1024));
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;
18INSERT INTO abc (b,c) SELECT b,c FROM abc;
19
20--replace_column 1 #
21SELECT DATA_LENGTH, INDEX_LENGTH from information_schema.TABLES WHERE
22TABLE_SCHEMA = 'test' AND TABLE_NAME = 'abc';
23ALTER TABLE abc add INDEX cc (c(800));
24--replace_column 1 #
25SELECT DATA_LENGTH, INDEX_LENGTH from information_schema.TABLES WHERE
26TABLE_SCHEMA = 'test' AND TABLE_NAME = 'abc';
27ALTER TABLE abc add INDEX bb (b(800));
28--replace_column 1 #
29SELECT DATA_LENGTH, INDEX_LENGTH from information_schema.TABLES WHERE
30TABLE_SCHEMA = 'test' AND TABLE_NAME = 'abc';
31DROP TABLE abc;
32