summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_in.test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2015-09-11 11:35:15 +0400
committerAlexander Barkov <bar@mariadb.org>2015-09-11 11:35:15 +0400
commit6f302d9f6cb1eafc018d9ca010dc40f15cb19390 (patch)
tree120fcb04d2c79f8c0bca6f9e1d6df5e56b95fc3a /mysql-test/t/func_in.test
parent0302efca7f522038f86a1b1dea3b7b1dd3759f86 (diff)
downloadmariadb-git-6f302d9f6cb1eafc018d9ca010dc40f15cb19390.tar.gz
MDEV-8755 Equal field propagation is not performed any longer for the IN list when multiple comparison types
Diffstat (limited to 'mysql-test/t/func_in.test')
-rw-r--r--mysql-test/t/func_in.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test
index 1e695142d90..fab39b04484 100644
--- a/mysql-test/t/func_in.test
+++ b/mysql-test/t/func_in.test
@@ -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;