1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-8755 Equal field propagation is not performed any longer for the IN list when multiple comparison types

This commit is contained in:
Alexander Barkov
2015-09-11 11:35:15 +04:00
parent 0302efca7f
commit 6f302d9f6c
3 changed files with 45 additions and 8 deletions

View File

@ -606,3 +606,16 @@ EXECUTE s;
DROP TABLE t1;
--echo # End of 5.3 tests
--echo #
--echo # MDEV-8755 Equal field propagation is not performed any longer for the IN list when multiple comparison types
--echo #
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
--echo # Ok to propagate equalities into the left IN argument in case of a single comparison type
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=1 AND a IN (1,2,3);
--echo # Ok to propagate equalities into IN () list, even if multiple comparison types
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=1 AND 1 IN (1,a,'3');
--echo # Not Ok to propagate equalities into the left IN argument in case of multiple comparison types
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=1 AND a IN (1,2,'3');
DROP TABLE t1;