diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2013-08-28 20:31:23 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2013-08-28 20:31:23 +0400 |
commit | 184df985829eef49a7af251ec8cb96117c4194dd (patch) | |
tree | 7d158702d2cb5311ce675f03cb4f03d0e8c77807 /mysql-test/t/join_outer.test | |
parent | 1906f1388e4d13b8a3328b58489dae862c6c8595 (diff) | |
parent | edd980225a9895f46754d54677bd76327152c78b (diff) | |
download | mariadb-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.test | 20 |
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 |