diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-06-08 15:02:40 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-06-08 15:02:40 +0300 |
commit | 72b248962136ccb08800d8267522549f0cdd4647 (patch) | |
tree | 1dbb0f39d6543b3b33cd395f9513140c6a6b0694 /mysql-test/main/derived_cond_pushdown.test | |
parent | bb28bffc3ed179a9912aced2b873e43999111887 (diff) | |
parent | 6e9642beb2cafecbcb96e591e1b4466b877d4885 (diff) | |
download | mariadb-git-72b248962136ccb08800d8267522549f0cdd4647.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/main/derived_cond_pushdown.test')
-rw-r--r-- | mysql-test/main/derived_cond_pushdown.test | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/main/derived_cond_pushdown.test b/mysql-test/main/derived_cond_pushdown.test index a880712c8bd..fb227e85ee6 100644 --- a/mysql-test/main/derived_cond_pushdown.test +++ b/mysql-test/main/derived_cond_pushdown.test @@ -2213,6 +2213,31 @@ select * from v1 where m > 0; drop view v1; drop table t1; +--echo # +--echo # MDEV-25635: pushdown into grouping view using aggregate functions +--echo # with constant arguments via a mergeable derived table +--echo # + +create table t1 (a int); +insert into t1 values (3), (7), (1), (3), (7), (7), (3); + +create view v1 as select a, sum(1) as f, sum(1) as g from t1 group by a; +select * from v1; +let $q1= +select * from (select * from v1) as dt where a=f and a=g; +eval $q1; +eval explain extended $q1; + +create view v2 as select a, min(1) as f, min(1) as g from t1 group by a; +select * from v2; +let $q2= +select * from (select * from v2) as dt where a=f and a=g; +eval $q2; +eval explain extended $q2; + +drop view v1,v2; +drop table t1; + --echo # End of 10.2 tests --echo # |