Debian Codegraph @

mysql-test/suite/innodb/include/innodb_stats_table_flag.inc

raw
1 #
2 -- echo =====
3 -- echo === Test ANALYZE behavior after default creation
4 -- echo =====
5
6 CREATE TABLE test_ps_flag (a INT) ENGINE=INNODB;
7
8 -- source suite/innodb/include/innodb_stats_table_flag_analyze.inc
9
10 DROP TABLE test_ps_flag;
11
12 CREATE TABLE test_ps_flag (a INT) ENGINE=INNODB STATS_PERSISTENT=default;
13
14 -- source suite/innodb/include/innodb_stats_table_flag_analyze.inc
15
16 DROP TABLE test_ps_flag;
17
18 #
19 -- echo =====
20 -- echo === Test ANALYZE behavior after creation with explicit PS=OFF
21 -- echo =====
22
23 CREATE TABLE test_ps_flag (a INT) ENGINE=INNODB STATS_PERSISTENT=0;
24
25 -- source suite/innodb/include/innodb_stats_table_flag_analyze.inc
26
27 DROP TABLE test_ps_flag;
28
29 #
30 -- echo =====
31 -- echo === Test ANALYZE behavior after creation with explicit PS=ON
32 -- echo =====
33
34 CREATE TABLE test_ps_flag (a INT) ENGINE=INNODB STATS_PERSISTENT=1;
35
36 -- source suite/innodb/include/innodb_stats_table_flag_analyze.inc
37
38 DROP TABLE test_ps_flag;
39
40 #
41 -- echo =====
42 -- echo === Test ANALYZE behavior after creation with explicit PS=OFF,
43 -- echo === then ALTER to ON, then ALTER to OFF, then ALTER to default
44 -- echo =====
45
46 CREATE TABLE test_ps_flag (a INT) ENGINE=INNODB STATS_PERSISTENT=0;
47
48 ALTER TABLE test_ps_flag STATS_PERSISTENT=1;
49
50 # also check that the change from the ALTER TABLE survives server restart
51 -- source include/restart_mysqld.inc
52
53 -- source suite/innodb/include/innodb_stats_table_flag_analyze.inc
54
55 ALTER TABLE test_ps_flag STATS_PERSISTENT=0;
56
57 -- source suite/innodb/include/innodb_stats_table_flag_analyze.inc
58
59 ALTER TABLE test_ps_flag STATS_PERSISTENT=default;
60
61 -- source suite/innodb/include/innodb_stats_table_flag_analyze.inc
62
63 DROP TABLE test_ps_flag;
64
65 #
66 -- echo =====
67 -- echo === Test ANALYZE behavior after creation with explicit PS=ON,
68 -- echo === then ALTER to OFF, then ALTER to ON, then ALTER to default
69 -- echo =====
70
71 CREATE TABLE test_ps_flag (a INT) ENGINE=INNODB STATS_PERSISTENT=1;
72
73 ALTER TABLE test_ps_flag STATS_PERSISTENT=0;
74
75 # also check that the change from the ALTER TABLE survives server restart
76 -- source include/restart_mysqld.inc
77
78 -- source suite/innodb/include/innodb_stats_table_flag_analyze.inc
79
80 ALTER TABLE test_ps_flag STATS_PERSISTENT=1;
81
82 -- source suite/innodb/include/innodb_stats_table_flag_analyze.inc
83
84 ALTER TABLE test_ps_flag STATS_PERSISTENT=default;
85
86 -- source suite/innodb/include/innodb_stats_table_flag_analyze.inc
87
88 DROP TABLE test_ps_flag;