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