diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/stat_tables_disabled.result | |
parent | Initial commit. (diff) | |
download | mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/stat_tables_disabled.result')
-rw-r--r-- | mysql-test/main/stat_tables_disabled.result | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/mysql-test/main/stat_tables_disabled.result b/mysql-test/main/stat_tables_disabled.result new file mode 100644 index 00000000..14be9535 --- /dev/null +++ b/mysql-test/main/stat_tables_disabled.result @@ -0,0 +1,79 @@ +set @innodb_stats_persistent_save= @@innodb_stats_persistent; +set @innodb_stats_persistent_sample_pages_save= +@@innodb_stats_persistent_sample_pages; +set global innodb_stats_persistent= 1; +set global innodb_stats_persistent_sample_pages=100; +SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB'; +select @@global.use_stat_tables; +@@global.use_stat_tables +PREFERABLY +select @@session.use_stat_tables; +@@session.use_stat_tables +PREFERABLY +set @save_use_stat_tables=@@use_stat_tables; +set use_stat_tables='preferably'; +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'; +set optimizer_switch='rowid_filter=off'; +# +# Bug mdev-503: optimizer ignores setting use_stat_tables='preferably' +# +flush tables +customer, lineitem, nation, orders, part, partsupp, region, supplier; +set use_stat_tables='never'; +EXPLAIN select sql_calc_found_rows straight_join +l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, +o_orderdate, o_shippriority +from orders, customer, lineitem +where c_mktsegment = 'BUILDING' and c_custkey = o_custkey +and l_orderkey = o_orderkey and o_orderdate < date '1995-03-15' + and l_shipdate > date '1995-03-15' +group by l_orderkey, o_orderdate, o_shippriority +order by revenue desc, o_orderdate +limit 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE orders ALL PRIMARY,i_o_orderdate,i_o_custkey NULL NULL NULL # Using where; Using temporary; Using filesort +1 SIMPLE customer eq_ref PRIMARY PRIMARY 4 dbt3_s001.orders.o_custkey # Using where +1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey # Using where +set use_stat_tables='preferably'; +EXPLAIN select sql_calc_found_rows straight_join +l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, +o_orderdate, o_shippriority +from orders, customer, lineitem +where c_mktsegment = 'BUILDING' and c_custkey = o_custkey +and l_orderkey = o_orderkey and o_orderdate < date '1995-03-15' + and l_shipdate > date '1995-03-15' +group by l_orderkey, o_orderdate, o_shippriority +order by revenue desc, o_orderdate +limit 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE orders ALL PRIMARY,i_o_orderdate,i_o_custkey NULL NULL NULL 1500 Using where; Using temporary; Using filesort +1 SIMPLE customer eq_ref PRIMARY PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where +1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where +flush tables customer, orders, lineitem; +EXPLAIN select sql_calc_found_rows straight_join +l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, +o_orderdate, o_shippriority +from orders, customer, lineitem +where c_mktsegment = 'BUILDING' and c_custkey = o_custkey +and l_orderkey = o_orderkey and o_orderdate < date '1995-03-15' + and l_shipdate > date '1995-03-15' +group by l_orderkey, o_orderdate, o_shippriority +order by revenue desc, o_orderdate +limit 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE orders ALL PRIMARY,i_o_orderdate,i_o_custkey NULL NULL NULL 1500 Using where; Using temporary; Using filesort +1 SIMPLE customer eq_ref PRIMARY PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where +1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where +# End of the test case for mdev-503 +set optimizer_switch=@save_optimizer_switch; +DROP DATABASE dbt3_s001; +use test; +set use_stat_tables=@save_use_stat_tables; +SET SESSION DEFAULT_STORAGE_ENGINE=DEFAULT; +set global innodb_stats_persistent= @innodb_stats_persistent_save; +set global innodb_stats_persistent_sample_pages= +@innodb_stats_persistent_sample_pages_save; |