Merge 10.3 into 10.4

This commit is contained in:
Marko Mäkelä 2019-03-08 11:19:48 +02:00
commit c67b306e4f
24 changed files with 295 additions and 71 deletions

View file

@ -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 #