summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/innodb/t/innodb_stats_table_flag_auto_recalc.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/innodb/t/innodb_stats_table_flag_auto_recalc.test')
-rw-r--r--mysql-test/suite/innodb/t/innodb_stats_table_flag_auto_recalc.test83
1 files changed, 83 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/innodb_stats_table_flag_auto_recalc.test b/mysql-test/suite/innodb/t/innodb_stats_table_flag_auto_recalc.test
new file mode 100644
index 00000000..01fe4331
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_stats_table_flag_auto_recalc.test
@@ -0,0 +1,83 @@
+#
+# Test CREATE TABLE ... STATS_AUTO_RECALC=0|1|default
+#
+
+-- source include/no_valgrind_without_big.inc
+-- source include/have_innodb.inc
+-- source include/not_embedded.inc
+
+-- vertical_results
+
+CREATE TABLE test_ps_auto_recalc (a INT, PRIMARY KEY (a)) ENGINE=INNODB;
+
+SHOW CREATE TABLE test_ps_auto_recalc;
+SELECT create_options FROM information_schema.tables
+WHERE table_name='test_ps_auto_recalc';
+
+ALTER TABLE test_ps_auto_recalc STATS_AUTO_RECALC=1;
+
+# confirm that the flag survives server restart
+-- source include/restart_mysqld.inc
+
+SHOW CREATE TABLE test_ps_auto_recalc;
+SELECT create_options FROM information_schema.tables
+WHERE table_name='test_ps_auto_recalc';
+
+DROP TABLE test_ps_auto_recalc;
+
+##
+
+CREATE TABLE test_ps_auto_recalc (a INT, PRIMARY KEY (a)) ENGINE=INNODB
+STATS_AUTO_RECALC=default;
+
+SHOW CREATE TABLE test_ps_auto_recalc;
+SELECT create_options FROM information_schema.tables
+WHERE table_name='test_ps_auto_recalc';
+
+DROP TABLE test_ps_auto_recalc;
+
+##
+
+CREATE TABLE test_ps_auto_recalc (a INT, PRIMARY KEY (a)) ENGINE=INNODB
+STATS_AUTO_RECALC=0;
+
+# confirm that the flag survives server restart
+-- source include/restart_mysqld.inc
+
+SHOW CREATE TABLE test_ps_auto_recalc;
+SELECT create_options FROM information_schema.tables
+WHERE table_name='test_ps_auto_recalc';
+
+ALTER TABLE test_ps_auto_recalc STATS_AUTO_RECALC=1;
+
+# confirm that the flag survives server restart
+-- source include/restart_mysqld.inc
+
+SHOW CREATE TABLE test_ps_auto_recalc;
+SELECT create_options FROM information_schema.tables
+WHERE table_name='test_ps_auto_recalc';
+
+DROP TABLE test_ps_auto_recalc;
+
+##
+
+CREATE TABLE test_ps_auto_recalc (a INT, PRIMARY KEY (a)) ENGINE=INNODB
+STATS_AUTO_RECALC=1;
+
+# confirm that the flag survives server restart
+-- source include/restart_mysqld.inc
+
+SHOW CREATE TABLE test_ps_auto_recalc;
+SELECT create_options FROM information_schema.tables
+WHERE table_name='test_ps_auto_recalc';
+
+ALTER TABLE test_ps_auto_recalc STATS_AUTO_RECALC=0;
+
+# confirm that the flag survives server restart
+-- source include/restart_mysqld.inc
+
+SHOW CREATE TABLE test_ps_auto_recalc;
+SELECT create_options FROM information_schema.tables
+WHERE table_name='test_ps_auto_recalc';
+
+DROP TABLE test_ps_auto_recalc;