diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-08 11:19:48 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-08 11:19:48 +0200 |
commit | c67b306e4f90788b979bf85f5a2ab282798fc897 (patch) | |
tree | b7fa51ab7bacbf5ed8c20367f009625a7da0f95b /mysql-test/main/derived_cond_pushdown.test | |
parent | 91d7e7b244be2ebf39eb135bacea99ed19657475 (diff) | |
parent | 94eb56fb29334a1075103becb625685b23f7d437 (diff) | |
download | mariadb-git-c67b306e4f90788b979bf85f5a2ab282798fc897.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 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/main/derived_cond_pushdown.test b/mysql-test/main/derived_cond_pushdown.test index ef28dcf1d97..ebbda849afa 100644 --- a/mysql-test/main/derived_cond_pushdown.test +++ b/mysql-test/main/derived_cond_pushdown.test @@ -2102,6 +2102,28 @@ eval EXPLAIN FORMAT=JSON $q2; DROP VIEW v1,v2; DROP TABLE t1; +--echo # +--echo # MDEV-18383: pushdown condition with the IF structure +--echo # defined with Item_cond item +--echo # + +CREATE TABLE t1(a INT, b INT); +CREATE TABLE t2(c INT, d INT); +INSERT INTO t1 VALUES (1,2),(3,4),(5,6); +INSERT INTO t2 VALUES (1,3),(3,7),(5,1); + +SELECT * +FROM t1, +( + SELECT MAX(d) AS max_d,c + FROM t2 + GROUP BY c +) AS tab +WHERE t1.a=tab.c AND + IF(2,t1.a=1 OR t1.b>5,1=1); + +DROP TABLE t1,t2; + --echo # End of 10.2 tests --echo # |