summaryrefslogtreecommitdiff
path: root/mysql-test/r/join_outer.result
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/r/join_outer.result
parent1906f1388e4d13b8a3328b58489dae862c6c8595 (diff)
parentedd980225a9895f46754d54677bd76327152c78b (diff)
downloadmariadb-git-184df985829eef49a7af251ec8cb96117c4194dd.tar.gz
Automatic merge of MDEV-4836 fix into 5.5
Diffstat (limited to 'mysql-test/r/join_outer.result')
-rw-r--r--mysql-test/r/join_outer.result20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result
index 79ae845cacf..cc0d7572a92 100644
--- a/mysql-test/r/join_outer.result
+++ b/mysql-test/r/join_outer.result
@@ -2139,6 +2139,26 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t0.a 1 Using index
drop table t0, t1;
#
+# MDEV-4836: Wrong result on <not null date column> IS NULL (old documented hack stopped working)
+# (this is a regression after fix for MDEV-4817)
+#
+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;
+id d i
+1 0000-00-00 NULL
+2 0000-00-00 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;
+i1 d1 i2 j2
+2 0000-00-00 NULL NULL
+DROP TABLE t1,t2;
+#
# Bug mdev-4942: LEFT JOIN with conjunctive
# <non-nullable datetime field> IS NULL in WHERE
# causes an assert failure