| 1 |
# |
| 2 |
# Test CREATE TABLE ... STATS_PERSISTENT=0|1|default |
| 3 |
# |
| 4 |
|
| 5 |
|
| 6 |
-- vertical_results |
| 7 |
|
| 8 |
# confirm that nothing is present before the test |
| 9 |
SELECT COUNT(*) FROM mysql.innodb_table_stats WHERE |
| 10 |
database_name = 'test' AND |
| 11 |
table_name = 'test_ps_create_table'; |
| 12 |
|
| 13 |
## |
| 14 |
|
| 15 |
CREATE TABLE test_ps_create_table (a INT, PRIMARY KEY (a)) |
| 16 |
ENGINE=INNODB STATS_PERSISTENT=0; |
| 17 |
|
| 18 |
# nothing should be present |
| 19 |
SELECT COUNT(*) FROM mysql.innodb_table_stats WHERE |
| 20 |
database_name = 'test' AND |
| 21 |
table_name = 'test_ps_create_table'; |
| 22 |
|
| 23 |
DROP TABLE test_ps_create_table; |
| 24 |
|
| 25 |
## |
| 26 |
|
| 27 |
CREATE TABLE test_ps_create_table (a INT, PRIMARY KEY (a)) |
| 28 |
ENGINE=INNODB; |
| 29 |
|
| 30 |
# 1 row should be present if the default of --innodb-stats-persistent is 1 |
| 31 |
SELECT COUNT(*) FROM mysql.innodb_table_stats WHERE |
| 32 |
database_name = 'test' AND |
| 33 |
table_name = 'test_ps_create_table'; |
| 34 |
|
| 35 |
DROP TABLE test_ps_create_table; |
| 36 |
|
| 37 |
## |
| 38 |
|
| 39 |
CREATE TABLE test_ps_create_table (a INT, PRIMARY KEY (a)) |
| 40 |
ENGINE=INNODB STATS_PERSISTENT=default; |
| 41 |
|
| 42 |
# 1 row should be present if the default of --innodb-stats-persistent is 1 |
| 43 |
SELECT COUNT(*) FROM mysql.innodb_table_stats WHERE |
| 44 |
database_name = 'test' AND |
| 45 |
table_name = 'test_ps_create_table'; |
| 46 |
|
| 47 |
DROP TABLE test_ps_create_table; |
| 48 |
|
| 49 |
## |
| 50 |
|
| 51 |
CREATE TABLE test_ps_create_table (a INT, PRIMARY KEY (a)) |
| 52 |
ENGINE=INNODB STATS_PERSISTENT=1; |
| 53 |
|
| 54 |
# 1 row should be present |
| 55 |
SELECT COUNT(*) FROM mysql.innodb_table_stats WHERE |
| 56 |
database_name = 'test' AND |
| 57 |
table_name = 'test_ps_create_table'; |
| 58 |
|
| 59 |
DROP TABLE test_ps_create_table; |