|
Reviewed and ran tests on this patch. Committed to trunk:
m1_142:151>svn commit Sending java\engine\org\apache\derby\impl\sql\compile\SetOperatorNode.java Transmitting file data . Committed revision 432367. changing fix in version as I believe this fix should be back ported to 10.1.
committed backport of change from trunk to 10.1:
------------------------------------------------------------------------ r432414 | mikem | 2006-08-17 15:33:59 -0700 (Thu, 17 Aug 2006) | 20 lines Backporting svn r432367 from trunk into 10.1. Fixes the following issue: 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 For more detailed explanation of problem and solution see html doc attached to Attaching a second version of the new test case for this issue. The test changed as part of the
Note that the test cases which were added for I'm also working to port This is test-only patch: d1681_test_v2.patch is ready for commit. I will look at committing these test changes to trunk and 10.2
committed d1681_test_v2.patch to trunk:
m1_142:27>svn commit Sending java\testing\org\apache\derbyTesting\functionTests\master\predicatePushdown.out Sending java\testing\org\apache\derbyTesting\functionTests\tests\lang\predicatePushdown.sql Transmitting file data .. Committed revision 437380. backported and committed patch d1681_test_v2.patch from trunk to 10.2 branch:
r437487 | mikem | 2006-08-27 17:34:07 -0700 (Sun, 27 Aug 2006) | 14 lines merging change 437380 from trunk to 10.2 branch: contributed by Army Brown Adding extra tests for this issue, fix already committed. Note that the test cases which were added for demonstrate the problem reported (and now fixed) in this issue. This checkin is a dedicated test case for this issue. Thanks for commiting the new test case to trunk and 10.2, Mike. Since the changes for
svn merge -r 437379:437380 http://svn.apache.org/repos/asf/db/derby/code/trunk Also, one small note: it looks there's a typo in the Jira issue for the svn commit logs with the d1681_test_v2.patch: there are a couple of references to " merged test case from trunk to 10.1 branch:
437380 m101_142:9>svn commit Sending java\testing\org\apache\derbyTesting\functionTests\master\predicatePushdown.out Sending java\testing\org\apache\derbyTesting\functionTests\tests\lang\predicatePushdown.sql Transmitting file data .. Committed revision 438138. I fixed the typo's that I could see, if there are any others let me know. Not a svn expert, you may have to svn update to see changes - not sure. Easiest if you give the svn rev number of the problem log, it is very easy to edit them: ie. svn propedit svn:log --revprop -r 437487, pops you into an edit window like svn commit.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 forDERBY-1633has 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).