diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2013-08-26 16:31:58 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2013-08-26 16:31:58 +0400 |
commit | af753c2188d9582a36a550bab0d2ee64205630c8 (patch) | |
tree | 0420a75bca3a02db57bfefaa293d0b0fe6a61c9f /mysql-test | |
parent | 7907b9b4da8c299318bd73d32b621dc34acc0f35 (diff) | |
parent | 970542ec90951c3e9d68ff310cdf181465854aaa (diff) | |
download | mariadb-git-af753c2188d9582a36a550bab0d2ee64205630c8.tar.gz |
Fix for MDEV-4836: Merge with current 5.5
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/join_outer.result | 12 | ||||
-rw-r--r-- | mysql-test/r/join_outer_jcl6.result | 12 | ||||
-rw-r--r-- | mysql-test/t/join_outer.test | 9 |
3 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 8b426c9a26f..3cfe2b20a1a 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -2139,6 +2139,18 @@ 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; +# # Bug mdev-4942: LEFT JOIN with conjunctive # <non-nullable datetime field> IS NULL in WHERE # causes an assert failure diff --git a/mysql-test/r/join_outer_jcl6.result b/mysql-test/r/join_outer_jcl6.result index 7ce7eb2eec7..5c20a87f10c 100644 --- a/mysql-test/r/join_outer_jcl6.result +++ b/mysql-test/r/join_outer_jcl6.result @@ -2150,6 +2150,18 @@ 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; +# # Bug mdev-4942: LEFT JOIN with conjunctive # <non-nullable datetime field> IS NULL in WHERE # causes an assert failure diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test index f48120bf63b..0ef1ea593a2 100644 --- a/mysql-test/t/join_outer.test +++ b/mysql-test/t/join_outer.test @@ -1686,6 +1686,15 @@ 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; --echo # --echo # Bug mdev-4942: LEFT JOIN with conjunctive |