diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2023-05-17 14:58:11 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2023-05-17 14:58:11 +0200 |
commit | 2543673dd22782f59299fd2e72179601892bd967 (patch) | |
tree | b73641bd88c9d1572203c75da618fce1937518e8 /mysql-test/main/derived_cond_pushdown.test | |
parent | 4e5b771e980edfdad5c5414aa62c81d409d585a4 (diff) | |
parent | ef911553f442cbb1baaac2af44c38b54fd058c41 (diff) | |
download | mariadb-git-2543673dd22782f59299fd2e72179601892bd967.tar.gz |
Merge branch '11.0' into 11.1bb-11.1-release
Diffstat (limited to 'mysql-test/main/derived_cond_pushdown.test')
-rw-r--r-- | mysql-test/main/derived_cond_pushdown.test | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/main/derived_cond_pushdown.test b/mysql-test/main/derived_cond_pushdown.test index d77e0210eae..5bd1489db78 100644 --- a/mysql-test/main/derived_cond_pushdown.test +++ b/mysql-test/main/derived_cond_pushdown.test @@ -4143,6 +4143,36 @@ explain select * from v1; drop view v1; drop table t1; +--echo # +--echo # MDEV-31102: execution of PS for query where pushdown of condition +--echo # into view defined as union is applied +--echo # + +create table t1 ( + n int, + lv varchar(31) charset latin1, + mv varchar(31) charset utf8mb3 +) engine=myisam; +insert into t1 values (1,'aa','xxx'), ('2','bb','yyy'), (3,'cc','zzz'); +create view v1 as +select case when n=1 then lv when n=2 then mv else NULL end as r from t1 +union +select 'a'; + +let $q= +select * from v1 where r < 'x'; + +eval $q; +eval explain extended $q; +eval explain format=json $q; +eval prepare stmt from "$q"; +execute stmt; +execute stmt; +deallocate prepare stmt; + +drop view v1; +drop table t1; + --echo # End of 10.4 tests --echo # |