diff options
author | unknown <igor@rurik.mysql.com> | 2004-08-12 23:41:06 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2004-08-12 23:41:06 -0700 |
commit | f0ac45bcf7f340933fd58aac9b2f4dbd5321b355 (patch) | |
tree | 30fd767ac34cee94ca0dbcf4c7738f4cb0571038 /mysql-test/t/join_nested.test | |
parent | 4aa20acc875be5ba6cb051f750f9599a80febd19 (diff) | |
download | mariadb-git-f0ac45bcf7f340933fd58aac9b2f4dbd5321b355.tar.gz |
join_nested.test, join_nested.result:
Added a case for bug #4976 when one of the inner tables is empty.
select.result, join.result:
Reversed the previous change of the erronious fix for bug #4976.
sql_select.cc:
The previous fix for bug 4976 was reversed as it
erroniously converted an outer join into an innner join
when on_expression does not refer to outer tables.
This is not valid if inner tables return an empty set.
Setting dependency on outer tables was added for the above cases.
To fix the crash in the test case of bug #4976
a guard was added that blocks running the crashing code for
nested outer joins.
sql/sql_select.cc:
The previous fix for bug 4976 was reversed as it
erroniously converted an outer join into an innner join
when on_expression does not refer to outer tables.
This is not valid if inner tables return an empty set.
Setting dependency on outer tables was added.
The crash of the test case for bug #4976 was fixed
adding a guard that blocks running the code for
nested outer joins.
mysql-test/r/join.result:
Reversed the previous change of the erronious fix for bug #4976.
mysql-test/r/select.result:
Reversed the previous change of the erronious fix for bug #4976.
mysql-test/r/join_nested.result:
Added a case for bug #4976 when one of the inner tables is empty.
mysql-test/t/join_nested.test:
Added a case for bug #4976 when one of the inner tables is empty.
Diffstat (limited to 'mysql-test/t/join_nested.test')
-rw-r--r-- | mysql-test/t/join_nested.test | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/t/join_nested.test b/mysql-test/t/join_nested.test index 63623cb5f54..9591f1fa7ed 100644 --- a/mysql-test/t/join_nested.test +++ b/mysql-test/t/join_nested.test @@ -745,5 +745,10 @@ INSERT INTO t3 VALUES (0), (1), (2), (3), (4), (5); EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON c < 3 and b = c; EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c; +SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c; + +DELETE FROM t3; +EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c; +SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c; DROP TABLE t1,t2,t3; |