diff options
author | Igor Babaev <igor@askmonty.org> | 2018-11-10 14:52:57 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2018-11-10 14:52:57 -0800 |
commit | 5f46670bd09babbee75a24ac82eb4ade0706da66 (patch) | |
tree | 85e2759b75650b8165c3e01638e9458eb4d1274c /mysql-test/main/partition_pruning.test | |
parent | 8d5a11122c32f4d9eb87536886c6e893377bdd07 (diff) | |
parent | 3ea7de9a78a1410a9b79362774247e9e44b201b3 (diff) | |
download | mariadb-git-5f46670bd09babbee75a24ac82eb4ade0706da66.tar.gz |
Merge branch '10.4' into 10.4-mdev16188
Diffstat (limited to 'mysql-test/main/partition_pruning.test')
-rw-r--r-- | mysql-test/main/partition_pruning.test | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/main/partition_pruning.test b/mysql-test/main/partition_pruning.test index 9d72e9c0d01..2879b0eae6c 100644 --- a/mysql-test/main/partition_pruning.test +++ b/mysql-test/main/partition_pruning.test @@ -1535,4 +1535,35 @@ select * from t1 where (a = 1 AND b < 'd' AND (c = 'b' OR (c = 'c' AND d = 1)) O (a = 1 AND b >= 'a' AND (c = 'c' OR (c = 'd' AND d = 2)))); drop table t1; +--echo # +--echo # MDEV-17493: Partition pruning doesn't work for nested outer joins +--echo # + +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1 (a int, b int, c int); +insert into t1 select a,a,a from t0; +create table t2 (a int, b int, c int); +insert into t2 select a,a,a from t0; + +create table t3 ( + part_id int, + a int +) partition by list (part_id) ( + partition p0 values in (0), + partition p1 values in (1), + partition p2 values in (2), + partition p3 values in (3), + partition p4 values in (4) +); +insert into t3 select mod(a,5), a from t0; + +explain partitions +select * from t1 left join t3 on (t1.a=t3.a and t3.part_id=3); + +--echo # The following should have partitions="p3", NOT p0,p1,p2,p3,p4: +explain partitions +select * from t1 left join (t3 join t2) on (t1.a=t3.a and t3.a=t2.b and t3.part_id=3); + +drop table t0,t1,t2,t3; |