summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/innodb/t/innodb_stats_flag_global_analyze.inc
blob: 8a68677e8eee66fe16a6b5857eeffe19f4771235 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
SHOW CREATE TABLE test_ps_flag;

DELETE FROM mysql.innodb_index_stats WHERE table_name = 'test_ps_flag';
DELETE FROM mysql.innodb_table_stats WHERE table_name = 'test_ps_flag';

# must be 0, we have just deleted the rows
SELECT COUNT(*) AS cnt_before FROM mysql.innodb_table_stats WHERE table_name = 'test_ps_flag';

SET STATEMENT use_stat_tables=never FOR
ANALYZE TABLE test_ps_flag;

# if the table is PS enabled, then this should be 1 and 0 otherwise
SELECT COUNT(*) AS cnt_after FROM mysql.innodb_table_stats WHERE table_name = 'test_ps_flag';