db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3033) select query results in nullpointer exception in skipScan()
Date Wed, 19 Sep 2007 22:13:13 GMT

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

Bryan Pendleton updated DERBY-3033:
-----------------------------------

    Attachment: queryPlanRS.txt
                generatedActivation.txt

Hmmm... Now I'm back to thinking that the result number management
has gone astray during the query flattening.

Attached is generatedActivation.txt, a de-compilation of the
generated activation for the query that fails.

Also attached is queryPlanRS.txt, which is a poor-man's-graphical 
view of the query plan, focusing specifically on the result sets and their
result set number (in parentheses next to the result set)

I've also specifically called out the two startKeyGetter()
methods, "e2" and "e7".

E2, which is used for the index probe into DISPATCHER_LOCKS
via DISPATCHER_LOCKS_SID_FK, accesses the start key value
using result set #4 (see the E2 code in generatedActivation.txt),
which seems correct to me.

E7, however, which is used for the index probe into DICOM_SEND_REQUESTS
via SENDREQ_STUDY_ID_FK, accesses the start key value using
result set #5. But this seems wrong. I believe that result set #3
should have been used in the code which is generated into
startKeyGetter method E7.

I do believe I'm closer, but I'm sure not there yet.

I wouldn't mind somebody checking this work, if anybody is interested.

> 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,
query_plan.new, query_plan.old, queryPlanRS.txt, 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.


Mime
View raw message