diff options
author | Igor Babaev <igor@askmonty.org> | 2012-05-06 22:42:14 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2012-05-06 22:42:14 -0700 |
commit | 906c9a93a0da7df1e27d776d561c84c48ce7ee6d (patch) | |
tree | d3cdf2f65d46a1fbb61517d59ba3b0b452fd46c2 /mysql-test/t/stat_tables.test | |
parent | 9f53c310d8fb76963d88e8a87a650d93469cdab2 (diff) | |
download | mariadb-git-906c9a93a0da7df1e27d776d561c84c48ce7ee6d.tar.gz |
Supported extended keys when collecting and using persistent statistics.
Diffstat (limited to 'mysql-test/t/stat_tables.test')
-rw-r--r-- | mysql-test/t/stat_tables.test | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/mysql-test/t/stat_tables.test b/mysql-test/t/stat_tables.test index cd896abebe1..aecb43fe763 100644 --- a/mysql-test/t/stat_tables.test +++ b/mysql-test/t/stat_tables.test @@ -10,15 +10,21 @@ DROP DATABASE IF EXISTS dbt3_s001; CREATE DATABASE dbt3_s001; use dbt3_s001; + +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='extended_keys=off'; --disable_query_log --disable_result_log --disable_warnings --source include/dbt3_s001.inc create index i_p_retailprice on part(p_retailprice); +delete from mysql.table_stat; +delete from mysql.column_stat; +delete from mysql.index_stat; ANALYZE TABLE customer, lineitem, nation, orders, part, partsupp, region, supplier; -FLUSH TABLES customer, lineitem, nation, orders, part, partsupp, region, supplier; +FLUSH TABLE mysql.table_stat, mysql.index_stat; --enable_warnings --enable_result_log --enable_query_log @@ -26,6 +32,7 @@ FLUSH TABLES customer, lineitem, nation, orders, part, partsupp, region, supplie select * from mysql.table_stat; select * from mysql.index_stat; +set optimizer_switch=@save_optimizer_switch; set @save_optimizer_switch=@@optimizer_switch; set optimizer_switch='index_condition_pushdown=off'; @@ -46,6 +53,28 @@ eval $Q5; set optimizer_switch=@save_optimizer_switch; +delete from mysql.index_stat; + +--disable_query_log +--disable_result_log +--disable_warnings +ANALYZE TABLE +customer, lineitem, nation, orders, part, partsupp, region, supplier; +FLUSH TABLE mysql.table_stat, mysql.index_stat; +--enable_warnings +--enable_result_log +--enable_query_log + +select * from mysql.table_stat; +select * from mysql.index_stat; + +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='index_condition_pushdown=off'; + +eval EXPLAIN $Q5; +eval $Q5; + +set optimizer_switch=@save_optimizer_switch; let $Q8= select o_year, |