diff options
-rw-r--r-- | mysql-test/r/join_outer.result | 8 | ||||
-rw-r--r-- | mysql-test/r/null.result | 17 |
2 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 79f12ce9b2c..e23ab27b6aa 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -625,3 +625,11 @@ SELECT * from t1 left join t2 on t1.id=t2.id where t2.id IS NULL; id name id idx 2 no NULL NULL drop table t1,t2; +create table t1 (bug_id mediumint, reporter mediumint); +create table t2 (bug_id mediumint, who mediumint, index(who)); +insert into t2 values (1,1),(1,2); +insert into t1 values (1,1),(2,1); +SELECT * FROM t1 LEFT JOIN t2 ON (t1.bug_id = t2.bug_id AND t2.who = 2) WHERE (t1.reporter = 2 OR t2.who = 2); +bug_id reporter bug_id who +1 1 1 2 +drop table t1,t2; diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index 4758304afa0..77f2c67bf05 100644 --- a/mysql-test/r/null.result +++ b/mysql-test/r/null.result @@ -40,3 +40,20 @@ insert into t1 values (null); select * from t1 where x != 0; x drop table t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( +indexed_field int default NULL, +KEY indexed_field (indexed_field) +); +INSERT INTO t1 VALUES (NULL),(NULL); +SELECT * FROM t1 WHERE indexed_field=NULL; +indexed_field +SELECT * FROM t1 WHERE indexed_field IS NULL; +indexed_field +NULL +NULL +SELECT * FROM t1 WHERE indexed_field<=>NULL; +indexed_field +NULL +NULL +DROP TABLE t1; |