Skip to content

Commit

Permalink
test for group by pushdown with a view
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed May 4, 2016
1 parent ea195d3 commit 92e47c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions storage/sequence/mysql-test/sequence/group_by.result
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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
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
#
Expand Down
4 changes: 4 additions & 0 deletions storage/sequence/mysql-test/sequence/group_by.test
Original file line number Diff line number Diff line change
Expand Up @@ -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 #
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 # The engine can't optimize the following queries
--echo #
Expand Down

0 comments on commit 92e47c3

Please sign in to comment.