-
unknown authored
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.
f0ac45bc