| 1 |
# |
| 2 |
# Test CREATE TABLE ... STATS_AUTO_RECALC=0|1|default |
| 3 |
# |
| 4 |
|
| 5 |
-- source include/no_valgrind_without_big.inc |
| 6 |
# Suppress a warning from Valgrind |
| 7 |
--disable_query_log |
| 8 |
call mtr.add_suppression("Warning: set address range perms"); |
| 9 |
--enable_query_log |
| 10 |
|
| 11 |
-- vertical_results |
| 12 |
|
| 13 |
CREATE TABLE test_ps_auto_recalc (a INT, PRIMARY KEY (a)) ENGINE=INNODB; |
| 14 |
|
| 15 |
SHOW CREATE TABLE test_ps_auto_recalc; |
| 16 |
SELECT create_options FROM information_schema.tables |
| 17 |
WHERE table_name='test_ps_auto_recalc'; |
| 18 |
|
| 19 |
ALTER TABLE test_ps_auto_recalc STATS_AUTO_RECALC=1; |
| 20 |
|
| 21 |
# confirm that the flag survives server restart |
| 22 |
-- source include/restart_mysqld.inc |
| 23 |
|
| 24 |
SHOW CREATE TABLE test_ps_auto_recalc; |
| 25 |
SELECT create_options FROM information_schema.tables |
| 26 |
WHERE table_name='test_ps_auto_recalc'; |
| 27 |
|
| 28 |
DROP TABLE test_ps_auto_recalc; |
| 29 |
|
| 30 |
## |
| 31 |
|
| 32 |
CREATE TABLE test_ps_auto_recalc (a INT, PRIMARY KEY (a)) ENGINE=INNODB |
| 33 |
STATS_AUTO_RECALC=default; |
| 34 |
|
| 35 |
SHOW CREATE TABLE test_ps_auto_recalc; |
| 36 |
SELECT create_options FROM information_schema.tables |
| 37 |
WHERE table_name='test_ps_auto_recalc'; |
| 38 |
|
| 39 |
DROP TABLE test_ps_auto_recalc; |
| 40 |
|
| 41 |
## |
| 42 |
|
| 43 |
CREATE TABLE test_ps_auto_recalc (a INT, PRIMARY KEY (a)) ENGINE=INNODB |
| 44 |
STATS_AUTO_RECALC=0; |
| 45 |
|
| 46 |
# confirm that the flag survives server restart |
| 47 |
-- source include/restart_mysqld.inc |
| 48 |
|
| 49 |
SHOW CREATE TABLE test_ps_auto_recalc; |
| 50 |
SELECT create_options FROM information_schema.tables |
| 51 |
WHERE table_name='test_ps_auto_recalc'; |
| 52 |
|
| 53 |
ALTER TABLE test_ps_auto_recalc STATS_AUTO_RECALC=1; |
| 54 |
|
| 55 |
# confirm that the flag survives server restart |
| 56 |
-- source include/restart_mysqld.inc |
| 57 |
|
| 58 |
SHOW CREATE TABLE test_ps_auto_recalc; |
| 59 |
SELECT create_options FROM information_schema.tables |
| 60 |
WHERE table_name='test_ps_auto_recalc'; |
| 61 |
|
| 62 |
DROP TABLE test_ps_auto_recalc; |
| 63 |
|
| 64 |
## |
| 65 |
|
| 66 |
CREATE TABLE test_ps_auto_recalc (a INT, PRIMARY KEY (a)) ENGINE=INNODB |
| 67 |
STATS_AUTO_RECALC=1; |
| 68 |
|
| 69 |
# confirm that the flag survives server restart |
| 70 |
-- source include/restart_mysqld.inc |
| 71 |
|
| 72 |
SHOW CREATE TABLE test_ps_auto_recalc; |
| 73 |
SELECT create_options FROM information_schema.tables |
| 74 |
WHERE table_name='test_ps_auto_recalc'; |
| 75 |
|
| 76 |
ALTER TABLE test_ps_auto_recalc STATS_AUTO_RECALC=0; |
| 77 |
|
| 78 |
# confirm that the flag survives server restart |
| 79 |
-- source include/restart_mysqld.inc |
| 80 |
|
| 81 |
SHOW CREATE TABLE test_ps_auto_recalc; |
| 82 |
SELECT create_options FROM information_schema.tables |
| 83 |
WHERE table_name='test_ps_auto_recalc'; |
| 84 |
|
| 85 |
DROP TABLE test_ps_auto_recalc; |
| 86 |
|
| 87 |
call mtr.add_suppression("ignoring ib_[0-9]+_[0-9]+.dblwr - page size doesn't match"); |