summaryrefslogtreecommitdiff
path: root/storage/sequence
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-05-02 18:28:40 +0200
committerSergei Golubchik <serg@mariadb.org>2016-05-05 01:05:05 +0200
commit92e47c393f707d9877a706f76cf26f226a37166c (patch)
tree62265c69e741b9b2b73f3989bcd742a22cafd44b /storage/sequence
parentea195d372bfa8f695ee2189f909c9c22b39df0c4 (diff)
downloadmariadb-git-92e47c393f707d9877a706f76cf26f226a37166c.tar.gz
test for group by pushdown with a view
Diffstat (limited to 'storage/sequence')
-rw-r--r--storage/sequence/mysql-test/sequence/group_by.result5
-rw-r--r--storage/sequence/mysql-test/sequence/group_by.test4
2 files changed, 9 insertions, 0 deletions
diff --git a/storage/sequence/mysql-test/sequence/group_by.result b/storage/sequence/mysql-test/sequence/group_by.result
index b3b56338aef..2941e85c1f4 100644
--- a/storage/sequence/mysql-test/sequence/group_by.result
+++ b/storage/sequence/mysql-test/sequence/group_by.result
@@ -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
#
diff --git a/storage/sequence/mysql-test/sequence/group_by.test b/storage/sequence/mysql-test/sequence/group_by.test
index b2e04037a8b..b3f4ab58771 100644
--- a/storage/sequence/mysql-test/sequence/group_by.test
+++ b/storage/sequence/mysql-test/sequence/group_by.test
@@ -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 #