Debian Codegraph @

mysql-test/suite/innodb/t/innodb_stats_table_flag_auto_recalc.test

raw
1 #
2 # Test CREATE TABLE ... STATS_AUTO_RECALC=0|1|default
3 #
4
5 -- source include/no_valgrind_without_big.inc
6 -- source include/have_innodb.inc
7 -- source include/not_embedded.inc
8
9 -- vertical_results
10
11 CREATE TABLE test_ps_auto_recalc (a INT, PRIMARY KEY (a)) ENGINE=INNODB;
12
13 SHOW CREATE TABLE test_ps_auto_recalc;
14 SELECT create_options FROM information_schema.tables
15 WHERE table_name='test_ps_auto_recalc';
16
17 ALTER TABLE test_ps_auto_recalc STATS_AUTO_RECALC=1;
18
19 # confirm that the flag survives server restart
20 -- source include/restart_mysqld.inc
21
22 SHOW CREATE TABLE test_ps_auto_recalc;
23 SELECT create_options FROM information_schema.tables
24 WHERE table_name='test_ps_auto_recalc';
25
26 DROP TABLE test_ps_auto_recalc;
27
28 ##
29
30 CREATE TABLE test_ps_auto_recalc (a INT, PRIMARY KEY (a)) ENGINE=INNODB
31 STATS_AUTO_RECALC=default;
32
33 SHOW CREATE TABLE test_ps_auto_recalc;
34 SELECT create_options FROM information_schema.tables
35 WHERE table_name='test_ps_auto_recalc';
36
37 DROP TABLE test_ps_auto_recalc;
38
39 ##
40
41 CREATE TABLE test_ps_auto_recalc (a INT, PRIMARY KEY (a)) ENGINE=INNODB
42 STATS_AUTO_RECALC=0;
43
44 # confirm that the flag survives server restart
45 -- source include/restart_mysqld.inc
46
47 SHOW CREATE TABLE test_ps_auto_recalc;
48 SELECT create_options FROM information_schema.tables
49 WHERE table_name='test_ps_auto_recalc';
50
51 ALTER TABLE test_ps_auto_recalc STATS_AUTO_RECALC=1;
52
53 # confirm that the flag survives server restart
54 -- source include/restart_mysqld.inc
55
56 SHOW CREATE TABLE test_ps_auto_recalc;
57 SELECT create_options FROM information_schema.tables
58 WHERE table_name='test_ps_auto_recalc';
59
60 DROP TABLE test_ps_auto_recalc;
61
62 ##
63
64 CREATE TABLE test_ps_auto_recalc (a INT, PRIMARY KEY (a)) ENGINE=INNODB
65 STATS_AUTO_RECALC=1;
66
67 # confirm that the flag survives server restart
68 -- source include/restart_mysqld.inc
69
70 SHOW CREATE TABLE test_ps_auto_recalc;
71 SELECT create_options FROM information_schema.tables
72 WHERE table_name='test_ps_auto_recalc';
73
74 ALTER TABLE test_ps_auto_recalc STATS_AUTO_RECALC=0;
75
76 # confirm that the flag survives server restart
77 -- source include/restart_mysqld.inc
78
79 SHOW CREATE TABLE test_ps_auto_recalc;
80 SELECT create_options FROM information_schema.tables
81 WHERE table_name='test_ps_auto_recalc';
82
83 DROP TABLE test_ps_auto_recalc;