Commit 92e47c39 authored by Sergei Golubchik's avatar Sergei Golubchik

test for group by pushdown with a view

parent ea195d37
...@@ -66,6 +66,11 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -66,6 +66,11 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY seq_1_to_15_step_2 index NULL PRIMARY 8 NULL # Using index 1 PRIMARY seq_1_to_15_step_2 index NULL PRIMARY 8 NULL # Using index
1 PRIMARY <derived2> ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join) 1 PRIMARY <derived2> ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
2 DERIVED NULL NULL NULL NULL NULL NULL # Storage engine handles GROUP BY 2 DERIVED NULL NULL NULL NULL NULL NULL # Storage engine handles GROUP BY
create view v1 as select count(*) from seq_1_to_15_step_2;
select * from v1;
count(*)
8
drop view v1;
# #
# The engine can't optimize the following queries # The engine can't optimize the following queries
# #
......
...@@ -30,6 +30,10 @@ select * from seq_1_to_15_step_2, (select count(*) from seq_1_to_15_step_2) as t ...@@ -30,6 +30,10 @@ select * from seq_1_to_15_step_2, (select count(*) from seq_1_to_15_step_2) as t
--replace_column 9 # --replace_column 9 #
explain select * from seq_1_to_15_step_2, (select count(*) from seq_1_to_15_step_2) as t1; explain select * from seq_1_to_15_step_2, (select count(*) from seq_1_to_15_step_2) as t1;
create view v1 as select count(*) from seq_1_to_15_step_2;
select * from v1;
drop view v1;
--echo # --echo #
--echo # The engine can't optimize the following queries --echo # The engine can't optimize the following queries
--echo # --echo #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment