# # Test CREATE TABLE ... STATS_AUTO_RECALC=0|1|default # -- source include/no_valgrind_without_big.inc # Suppress a warning from Valgrind --disable_query_log call mtr.add_suppression("Warning: set address range perms"); --enable_query_log -- 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; call mtr.add_suppression("ignoring ib_[0-9]+_[0-9]+.dblwr - page size doesn't match");