diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2013-09-03 18:41:07 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2013-09-03 18:41:07 +0400 |
commit | 92003f0166b226207837ec78e1258d469a379cff (patch) | |
tree | 2d369ed61945247f0e1bc88cf36d248a9b840500 /mysql-test/r/join_outer.result | |
parent | de1c060ecfb177badcfd6a6b9d5bd53f68f3b1f2 (diff) | |
parent | d6f7649d3c7f2e055a77ef9432c245928675ef4c (diff) | |
download | mariadb-git-92003f0166b226207837ec78e1258d469a379cff.tar.gz |
MDEV-4836: Merge into 5.5-main
Diffstat (limited to 'mysql-test/r/join_outer.result')
-rw-r--r-- | mysql-test/r/join_outer.result | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 15890e546d2..c9b694c9532 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -2139,6 +2139,38 @@ 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; +# Another testcase +CREATE TABLE t1 (i1 INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (NULL); +CREATE TABLE t2 (i2 INT, a INT, b INT) ENGINE=MyISAM; +CREATE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2; +INSERT INTO t2 VALUES (NULL,1,2),(NULL,2,3); +SELECT * FROM t1 LEFT JOIN v2 ON i1 = i2 WHERE a < b; +i1 i2 a b +SELECT * FROM t1 LEFT JOIN t2 ON i1 = i2 WHERE a < b; +i1 i2 a b +drop view v2; +drop table t1,t2; +# # Bug mdev-4942: LEFT JOIN with conjunctive # <non-nullable datetime field> IS NULL in WHERE # causes an assert failure |