diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2023-03-17 06:58:33 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2023-03-17 06:58:33 +0200 |
commit | fffa4b28a136d1297066cc652127619d0ed82449 (patch) | |
tree | 346762d8c175e191ace4e8d138739c1f1bda63db /mysql-test/main | |
parent | 47036387756d465c68ac4360eb031e78f48d9e58 (diff) | |
parent | acf46b7b36a794cd66033e61e064f16896cf7d22 (diff) | |
download | mariadb-git-fffa4b28a136d1297066cc652127619d0ed82449.tar.gz |
Merge 10.8 into 10.9
Diffstat (limited to 'mysql-test/main')
-rw-r--r-- | mysql-test/main/derived_cond_pushdown.result | 17 | ||||
-rw-r--r-- | mysql-test/main/derived_cond_pushdown.test | 21 |
2 files changed, 38 insertions, 0 deletions
diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result index 8c936f3374a..4a0021828ed 100644 --- a/mysql-test/main/derived_cond_pushdown.result +++ b/mysql-test/main/derived_cond_pushdown.result @@ -20697,3 +20697,20 @@ id select_type table type possible_keys key key_len ref rows Extra drop view v1; drop table t1; # End of 10.4 tests +# +# MDEV-28958: condition pushable into view after simplification +# contains constant TRUE/FALSE as subformula +# +create table t1 (c1 int); +insert into t1 values (3), (7), (1), (3), (1), (3); +create table t2 (c2 int); +insert into t2 values (3), (5), (7), (3); +create view v1 as select * from t1 group by c1; +create view v2 as select c1 as a, c2 as b from v1,t2 where c1=c2; +select * from v2 group by a,b having a=b or b > a+10; +a b +3 3 +7 7 +drop view v1,v2; +drop table t1,t2; +# End of 10.7 tests diff --git a/mysql-test/main/derived_cond_pushdown.test b/mysql-test/main/derived_cond_pushdown.test index 17115c143ac..dc454bf80de 100644 --- a/mysql-test/main/derived_cond_pushdown.test +++ b/mysql-test/main/derived_cond_pushdown.test @@ -3944,3 +3944,24 @@ drop view v1; drop table t1; --echo # End of 10.4 tests + +--echo # +--echo # MDEV-28958: condition pushable into view after simplification +--echo # contains constant TRUE/FALSE as subformula +--echo # + +create table t1 (c1 int); +insert into t1 values (3), (7), (1), (3), (1), (3); + +create table t2 (c2 int); +insert into t2 values (3), (5), (7), (3); + +create view v1 as select * from t1 group by c1; +create view v2 as select c1 as a, c2 as b from v1,t2 where c1=c2; + +select * from v2 group by a,b having a=b or b > a+10; + +drop view v1,v2; +drop table t1,t2; + +--echo # End of 10.7 tests |