mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user