db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A B (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3033) select query results in nullpointer exception in skipScan()
Date Tue, 25 Sep 2007 16:53:50 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

A B updated DERBY-3033:

    Attachment: repro3.java

I switched Bryan's repro to use primary and foreign key constraints instead of explicit indexes.
 That in turn meant that I had to update the INSERT statements to satisfy the foreign key

Once I did that, I ran the query in "repro2.java" with _no_ optimizer overrides and while
it did not fail, it *did* show the desired join order, which is a step in the right direction.

Then I (accidentally) swapped the order of the FROM tables in the top-level query (i.e. I
put "DSR" first, then "ST", instead of the other way around), and when I did that the query
failed with an NPE.  Odd?

The bad news is that the stack trace for *this* NPE is different from the one reported in
this issue.  Nonetheless, it follows the same pattern: i.e. it does not occur in,
and if I back out the changes for DERBY-1357 it goes away.  So I'm not sure if this is the
same issue or not?

Attaching as "repro3.java"...

> 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:
>         Environment: Windows XP, Java 5.0, JDBC, Derby
>            Reporter: Haolan Qin
>            Assignee: Bryan Pendleton
>         Attachments: bug4736.sql, d3033-sane-ij-session-, generatedActivation.txt,
noClosureOfNotExists.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.

View raw message