Debian Codegraph @

mysql-test/suite/innodb/r/import_update_stats.result

raw
1 CREATE TABLE t1 (
2 col_1 CHAR (255),
3 col_2 VARCHAR (255)
4 ) ENGINE = InnoDB;
5 CREATE INDEX idx1 ON t1(col_1);
6 CREATE INDEX idx2 ON t1(col_2);
7 SHOW INDEXES FROM t1;
8 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
9 t1 1 idx1 1 col_1 A 0 NULL NULL YES BTREE NO
10 t1 1 idx2 1 col_2 A 0 NULL NULL YES BTREE NO
11 INSERT INTO t1 VALUES ("col1_00001", "col2_00001"), ("col1_00002", "col2_00002");
12 SET STATEMENT use_stat_tables=never FOR
13 ANALYZE TABLE t1;
14 Table Op Msg_type Msg_text
15 test.t1 analyze status OK
16 SHOW INDEXES FROM t1;
17 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
18 t1 1 idx1 1 col_1 A 2 NULL NULL YES BTREE NO
19 t1 1 idx2 1 col_2 A 2 NULL NULL YES BTREE NO
20 FLUSH TABLES t1 FOR EXPORT;
21 backup: t1
22 UNLOCK TABLES;
23 DROP TABLE t1;
24 CREATE TABLE t1 (
25 col_1 CHAR (255),
26 col_2 VARCHAR (255)
27 ) ENGINE = InnoDB STATS_PERSISTENT=1;
28 CREATE INDEX idx1 ON t1(col_1);
29 CREATE INDEX idx2 ON t1(col_2);
30 SHOW INDEXES FROM t1;
31 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
32 t1 1 idx1 1 col_1 A 0 NULL NULL YES BTREE NO
33 t1 1 idx2 1 col_2 A 0 NULL NULL YES BTREE NO
34 INSERT INTO t1 VALUES ("col1_00001", "col2_00001");
35 SHOW INDEXES FROM t1;
36 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
37 t1 1 idx1 1 col_1 A 1 NULL NULL YES BTREE NO
38 t1 1 idx2 1 col_2 A 1 NULL NULL YES BTREE NO
39 SET STATEMENT use_stat_tables=never FOR
40 ANALYZE TABLE t1;
41 Table Op Msg_type Msg_text
42 test.t1 analyze status OK
43 SHOW INDEXES FROM t1;
44 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
45 t1 1 idx1 1 col_1 A 1 NULL NULL YES BTREE NO
46 t1 1 idx2 1 col_2 A 1 NULL NULL YES BTREE NO
47 ALTER TABLE t1 DISCARD TABLESPACE;
48 restore: t1 .ibd and .cfg files
49 ALTER TABLE t1 IMPORT TABLESPACE;
50 SHOW INDEXES FROM t1;
51 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
52 t1 1 idx1 1 col_1 A 2 NULL NULL YES BTREE NO
53 t1 1 idx2 1 col_2 A 2 NULL NULL YES BTREE NO
54 SET STATEMENT use_stat_tables=never FOR
55 ANALYZE TABLE t1;
56 Table Op Msg_type Msg_text
57 test.t1 analyze status OK
58 SHOW INDEXES FROM t1;
59 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
60 t1 1 idx1 1 col_1 A 2 NULL NULL YES BTREE NO
61 t1 1 idx2 1 col_2 A 2 NULL NULL YES BTREE NO
62 DROP TABLE t1;