[ http://issues.apache.org/jira/browse/DERBY-1681?page=all ]
A B updated DERBY-1681:
-----------------------
Attachment: d1681_v1.patch
d1681_test.patch
DERBY-1681_v1.html
Attaching three things to this issue:
1. A patch for the problem: d1681_v1.patch
2. A patch for a test to verify the fix: d1681_test.patch
3. A (short) description of the issue and the fix.
The reason I've separated the fix from the test is that the test case relies on
database objects that are included in the patch for DERBY-1633, and thus the
test patch cannot be applied until the patch for DERBY-1633 has been applied.
The actual fix to the problem, though--i.e. d1681_v1.patch--can be applied and
committed independently of DERBY-1633, and thus I've separated it out.
I ran derbyall on Red Hat Linux with ibm142 against SANE jars and there were no
new failures.
Both patches are ready for review and commit (with the caveat just noted about
the test case).
> Regression (wrong results): Join predicate can be ignored for left-most child
> in a chain of nested unions.
> ----------------------------------------------------------------------------------------------------------
>
> Key: DERBY-1681
> URL: http://issues.apache.org/jira/browse/DERBY-1681
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.1.3.1, 10.1.3.0, 10.2.0.0
> Reporter: A B
> Assigned To: A B
> Fix For: 10.2.0.0
>
> Attachments: d1681_test.patch, d1681_v1.patch, DERBY-1681_v1.html
>
>
> If Derby chooses to do a join between two FromTables and the right table is a
> chain of UNIONs, then the optimizer may choose to push the join predicate (if
> provided) down into the UNION and to both children of every UNION in the
> chain. But if the predicate cannot be pushed to the children of any of the
> UNIONs (except the top-level one) the predicate can end up being ignored
> altogether with respect to that UNION's children. The result is that query
> execution can return rows that do not satisfy the predicate.
> This is a regression introduced in 10.1.2.4 and thus it affects 10.1.3 and
> 10.2. I came across this while tracing through code for DERBY-1633.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira