diff options
author | Galina Shalygina <galina.shalygina@mariadb.com> | 2018-08-01 20:44:59 +0300 |
---|---|---|
committer | Galina Shalygina <galina.shalygina@mariadb.com> | 2018-08-27 16:15:05 +0200 |
commit | 55163ba1bdb1a05daadc66c41c959994231b361c (patch) | |
tree | c3e3001e7757fff2fc256522f5fe628aed0aa347 /mysql-test/r | |
parent | 2b76f6f61dba93fd920456a0dd9efd366a6dc6b1 (diff) | |
download | mariadb-git-55163ba1bdb1a05daadc66c41c959994231b361c.tar.gz |
MDEV-16803: Pushdown Item_func_in item that uses vectors in several SELECTs
The bug appears because of the Item_func_in::build_clone() method.
The 'array' field for the Item_func_in item that can be pushed into
the materialized view/derived table was built in the wrong way.
It becomes lame after the pushdown of the condition into the first
SELECT that defines that view/derived table. The server crashes in
the pushdown into the next SELECT while trying to use already lame
'array' field.
To fix it Item_func_in::build_clone() was changed.
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/derived_cond_pushdown.result | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/r/derived_cond_pushdown.result b/mysql-test/r/derived_cond_pushdown.result index fd930d13547..9ef3488e06d 100644 --- a/mysql-test/r/derived_cond_pushdown.result +++ b/mysql-test/r/derived_cond_pushdown.result @@ -10220,3 +10220,24 @@ EXPLAIN } } DROP TABLE t1; +# +# MDEV-16803: pushdown condition with IN predicate in the derived table +# defined with several SELECT statements +# +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1,2),(3,2),(1,1); +SELECT * FROM +( +SELECT a,b,1 as c +FROM t1 +UNION ALL +SELECT a,b,2 as c +FROM t1 +) AS tab +WHERE ((a,b) IN ((1,2),(3,2))); +a b c +1 2 1 +3 2 1 +1 2 2 +3 2 2 +DROP TABLE t1; |