1CREATE TABLE t ( 2a INT, 3b INT, 4c INT GENERATED ALWAYS AS(a+b), 5d INT GENERATED ALWAYS AS(a+b+b), 6KEY idxa (a), 7KEY vidxcd (c, d) 8) ENGINE=INNODB; 9INSERT INTO t (a,b) VALUES (1, 2); 10SELECT index_name, stat_name, stat_description 11FROM mysql.innodb_index_stats 12WHERE database_name = 'test' AND table_name = 't'; 13index_name stat_name stat_description 14GEN_CLUST_INDEX n_diff_pfx01 DB_ROW_ID 15GEN_CLUST_INDEX n_leaf_pages Number of leaf pages in the index 16GEN_CLUST_INDEX size Number of pages in the index 17idxa n_diff_pfx01 a 18idxa n_diff_pfx02 a,DB_ROW_ID 19idxa n_leaf_pages Number of leaf pages in the index 20idxa size Number of pages in the index 21vidxcd n_diff_pfx01 c 22vidxcd n_diff_pfx02 c,d 23vidxcd n_diff_pfx03 c,d,DB_ROW_ID 24vidxcd n_leaf_pages Number of leaf pages in the index 25vidxcd size Number of pages in the index 26ALTER TABLE t ADD COLUMN e INT GENERATED ALWAYS AS(a+a+b), ADD INDEX idxb (b), ALGORITHM=INPLACE; 27SELECT index_name, stat_name, stat_description 28FROM mysql.innodb_index_stats 29WHERE database_name = 'test' AND table_name = 't'; 30index_name stat_name stat_description 31GEN_CLUST_INDEX n_diff_pfx01 DB_ROW_ID 32GEN_CLUST_INDEX n_leaf_pages Number of leaf pages in the index 33GEN_CLUST_INDEX size Number of pages in the index 34idxa n_diff_pfx01 a 35idxa n_diff_pfx02 a,DB_ROW_ID 36idxa n_leaf_pages Number of leaf pages in the index 37idxa size Number of pages in the index 38idxb n_diff_pfx01 b 39idxb n_diff_pfx02 b,DB_ROW_ID 40idxb n_leaf_pages Number of leaf pages in the index 41idxb size Number of pages in the index 42vidxcd n_diff_pfx01 c 43vidxcd n_diff_pfx02 c,d 44vidxcd n_diff_pfx03 c,d,DB_ROW_ID 45vidxcd n_leaf_pages Number of leaf pages in the index 46vidxcd size Number of pages in the index 47ALTER TABLE t DROP COLUMN c, DROP INDEX idxa, ALGORITHM=INPLACE; 48SELECT index_name, stat_name, stat_description 49FROM mysql.innodb_index_stats 50WHERE database_name = 'test' AND table_name = 't'; 51index_name stat_name stat_description 52GEN_CLUST_INDEX n_diff_pfx01 DB_ROW_ID 53GEN_CLUST_INDEX n_leaf_pages Number of leaf pages in the index 54GEN_CLUST_INDEX size Number of pages in the index 55idxb n_diff_pfx01 b 56idxb n_diff_pfx02 b,DB_ROW_ID 57idxb n_leaf_pages Number of leaf pages in the index 58idxb size Number of pages in the index 59vidxcd n_diff_pfx01 d 60vidxcd n_diff_pfx02 d,DB_ROW_ID 61vidxcd n_leaf_pages Number of leaf pages in the index 62vidxcd size Number of pages in the index 63ALTER TABLE t ADD INDEX vidxe (e), ALGORITHM=INPLACE; 64SELECT index_name, stat_name, stat_description 65FROM mysql.innodb_index_stats 66WHERE database_name = 'test' AND table_name = 't'; 67index_name stat_name stat_description 68GEN_CLUST_INDEX n_diff_pfx01 DB_ROW_ID 69GEN_CLUST_INDEX n_leaf_pages Number of leaf pages in the index 70GEN_CLUST_INDEX size Number of pages in the index 71idxb n_diff_pfx01 b 72idxb n_diff_pfx02 b,DB_ROW_ID 73idxb n_leaf_pages Number of leaf pages in the index 74idxb size Number of pages in the index 75vidxcd n_diff_pfx01 d 76vidxcd n_diff_pfx02 d,DB_ROW_ID 77vidxcd n_leaf_pages Number of leaf pages in the index 78vidxcd size Number of pages in the index 79vidxe n_diff_pfx01 e 80vidxe n_diff_pfx02 e,DB_ROW_ID 81vidxe n_leaf_pages Number of leaf pages in the index 82vidxe size Number of pages in the index 83ALTER TABLE t ADD COLUMN f INT GENERATED ALWAYS AS(a + a), ADD INDEX vidxf (f), ALGORITHM=INPLACE; 84SELECT index_name, stat_name, stat_description 85FROM mysql.innodb_index_stats 86WHERE database_name = 'test' AND table_name = 't'; 87index_name stat_name stat_description 88GEN_CLUST_INDEX n_diff_pfx01 DB_ROW_ID 89GEN_CLUST_INDEX n_leaf_pages Number of leaf pages in the index 90GEN_CLUST_INDEX size Number of pages in the index 91idxb n_diff_pfx01 b 92idxb n_diff_pfx02 b,DB_ROW_ID 93idxb n_leaf_pages Number of leaf pages in the index 94idxb size Number of pages in the index 95vidxcd n_diff_pfx01 d 96vidxcd n_diff_pfx02 d,DB_ROW_ID 97vidxcd n_leaf_pages Number of leaf pages in the index 98vidxcd size Number of pages in the index 99vidxe n_diff_pfx01 e 100vidxe n_diff_pfx02 e,DB_ROW_ID 101vidxe n_leaf_pages Number of leaf pages in the index 102vidxe size Number of pages in the index 103vidxf n_diff_pfx01 f 104vidxf n_diff_pfx02 f,DB_ROW_ID 105vidxf n_leaf_pages Number of leaf pages in the index 106vidxf size Number of pages in the index 107ALTER TABLE t DROP INDEX vidxcd; 108SELECT index_name, stat_name, stat_description 109FROM mysql.innodb_index_stats 110WHERE database_name = 'test' AND table_name = 't'; 111index_name stat_name stat_description 112GEN_CLUST_INDEX n_diff_pfx01 DB_ROW_ID 113GEN_CLUST_INDEX n_leaf_pages Number of leaf pages in the index 114GEN_CLUST_INDEX size Number of pages in the index 115idxb n_diff_pfx01 b 116idxb n_diff_pfx02 b,DB_ROW_ID 117idxb n_leaf_pages Number of leaf pages in the index 118idxb size Number of pages in the index 119vidxe n_diff_pfx01 e 120vidxe n_diff_pfx02 e,DB_ROW_ID 121vidxe n_leaf_pages Number of leaf pages in the index 122vidxe size Number of pages in the index 123vidxf n_diff_pfx01 f 124vidxf n_diff_pfx02 f,DB_ROW_ID 125vidxf n_leaf_pages Number of leaf pages in the index 126vidxf size Number of pages in the index 127DROP TABLE t; 128