[ https://issues.apache.org/jira/browse/DERBY-3033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Pendleton updated DERBY-3033: ----------------------------------- Attachment: patchWithRenamedTest.diff Attached is 'patchWithRenamedTest.diff', a patch proposal. The 'svn stat' for this patch is: M java/engine/org/apache/derby/impl/sql/compile/FromList.java M java/engine/org/apache/derby/impl/sql/compile/PredicateList.java M java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java A java/testing/org/apache/derbyTesting/functionTests/tests/lang/ExistsWithSubqueriesTest.java D java/testing/org/apache/derbyTesting/functionTests/tests/lang/ExistsWithSetOpsTest.java The patch contains a regression test for this issue, modeled on the repro3.java test case and inserted into the (renamed) ExistsWithSubqueriesTest.java. The core of the patch is the same, which is to notice that a join predicate mentions a table which has the NOT EXISTS usage, and to exclude that predicate from transitive join consideration. I think this patch is worthy of review; please have a look when you have a chance. > select query results in nullpointer exception in skipScan() > ----------------------------------------------------------- > > Key: DERBY-3033 > URL: https://issues.apache.org/jira/browse/DERBY-3033 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.2.2.0 > Environment: Windows XP, Java 5.0, JDBC, Derby 10.2.2.0 > Reporter: Haolan Qin > Assignee: Bryan Pendleton > Attachments: bug4736.sql, d3033-sane-ij-session-10.3.1.5.txt, > generatedActivation.txt, noClosureOfNotExists.diff, > patchWithRenamedTest.diff, query_plan.new, query_plan.old, queryPlanRS.txt, > repro2.java, repro2.java, repro3.java, test.rar, test.zip, viewer_10_1.zip > > > The following error was repeatedly thrown when we tried to run a select query > via JDBC. Strangely, the exact same select query did not trigger any error > when run from the command line console. After we added an index, the error > went away completely. > java.lang.NullPointerException > at org.apache.derby.impl.sql.execute.NoPutResultSetImpl.skipScan(Unknown > Source) > at org.apache.derby.impl.sql.execute.TableScanResultSet.openCore(Unknown > Source) > at > org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.openCore(Unknown > Source) > at > org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown > Source) > at org.apache.derby.impl.sql.execute.JoinResultSet.openRight(Unknown Source) > at org.apache.derby.impl.sql.execute.JoinResultSet.openCore(Unknown Source) > at > org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown > Source) > at org.apache.derby.impl.sql.execute.SortResultSet.openCore(Unknown Source) > at > org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown > Source) > at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(Unknown > Source) > at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) > at > org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown > Source) > at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source) > at org.apache.derby.impl.drda.DRDAStatement.execute(Unknown Source) > at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source) > at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.