diff options
author | igor@rurik.mysql.com <> | 2005-03-12 23:31:52 -0800 |
---|---|---|
committer | igor@rurik.mysql.com <> | 2005-03-12 23:31:52 -0800 |
commit | a90d2bd97c9893b2a3df6f8aeeb315d589f4660c (patch) | |
tree | 9d56e4798e76add9c769697efe2c6b5b95180ba4 /mysql-test/r/join_outer.result | |
parent | d1140661746fc51b5e9b1d021f25cd20009ec4ae (diff) | |
download | mariadb-git-a90d2bd97c9893b2a3df6f8aeeb315d589f4660c.tar.gz |
join_outer.result, join_outer.test:
Added a test case for bug #9017.
item_cmpfunc.h:
A wrong not_null_tables method for Item_cond_xor
caused a conversion of a left join into an inner join
that was not valid.
Diffstat (limited to 'mysql-test/r/join_outer.result')
-rw-r--r-- | mysql-test/r/join_outer.result | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 09a55ba2054..7981fc9c733 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -836,3 +836,25 @@ id text_id text_data 1 0 0-SV 2 10 10-SV DROP TABLE invoice, text_table; +CREATE TABLE t1 (a int PRIMARY KEY, b int); +CREATE TABLE t2 (a int PRIMARY KEY, b int); +INSERT INTO t1 VALUES (1,1), (2,1), (3,1), (4,2); +INSERT INTO t2 VALUES (1,2), (2,2); +SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.a; +a b a b +1 1 1 2 +2 1 2 2 +3 1 NULL NULL +4 2 NULL NULL +SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.a WHERE t1.b=1; +a b a b +1 1 1 2 +2 1 2 2 +3 1 NULL NULL +SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.a +WHERE t1.b=1 XOR (NOT ISNULL(t2.a) AND t2.b=1); +a b a b +1 1 1 2 +2 1 2 2 +3 1 NULL NULL +DROP TABLE t1,t2; |