summaryrefslogtreecommitdiff
path: root/mysql-test/t/join_outer.test
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2013-08-28 20:31:23 +0400
committerSergey Petrunya <psergey@askmonty.org>2013-08-28 20:31:23 +0400
commit184df985829eef49a7af251ec8cb96117c4194dd (patch)
tree7d158702d2cb5311ce675f03cb4f03d0e8c77807 /mysql-test/t/join_outer.test
parent1906f1388e4d13b8a3328b58489dae862c6c8595 (diff)
parentedd980225a9895f46754d54677bd76327152c78b (diff)
downloadmariadb-git-184df985829eef49a7af251ec8cb96117c4194dd.tar.gz
Automatic merge of MDEV-4836 fix into 5.5
Diffstat (limited to 'mysql-test/t/join_outer.test')
-rw-r--r--mysql-test/t/join_outer.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test
index 04bf09b7484..765118d4775 100644
--- a/mysql-test/t/join_outer.test
+++ b/mysql-test/t/join_outer.test
@@ -1686,6 +1686,26 @@ explain select * from t1 left join t0 on t0.a=t1.pk where t0.person_id='fooo' or
drop table t0, t1;
+--echo #
+--echo # MDEV-4836: Wrong result on <not null date column> IS NULL (old documented hack stopped working)
+--echo # (this is a regression after fix for MDEV-4817)
+--echo #
+CREATE TABLE t1 (id INT, d DATE NOT NULL);
+INSERT INTO t1 VALUES (1,'0000-00-00'),(2,'0000-00-00');
+CREATE TABLE t2 (i INT);
+SELECT * FROM t1 LEFT JOIN t2 ON (id=i) WHERE NULL OR d IS NULL;
+DROP TABLE t1,t2;
+
+
+CREATE TABLE t1 (i1 INT, d1 DATE NOT NULL);
+INSERT INTO t1 VALUES (1,'2012-12-21'),(2,'0000-00-00');
+
+CREATE TABLE t2 (i2 INT, j2 INT);
+INSERT INTO t2 VALUES (1,10),(2,20);
+
+SELECT * FROM t1 LEFT JOIN t2 ON i1 = j2 WHERE d1 IS NULL AND 1 OR i1 = i2;
+DROP TABLE t1,t2;
+
--echo #
--echo # Bug mdev-4942: LEFT JOIN with conjunctive