db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-6212) NullPointerException when calling a procedure with sub-query as argument
Date Thu, 02 May 2013 12:02:16 GMT

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

Knut Anders Hatlen updated DERBY-6212:

    Attachment: derby-6212-01-a.diff

The attached patch derby-6212-01-a.diff makes CallStatementNode pass a SubqueryList to bindExpression()
so that it doesn't fail with NPE if there is a sub-query. After the statement is bound, it
raises a syntax error if there were any sub-queries. Example:

ij> call syscs_util.syscs_set_database_property('abc', (select max(ibmreqd) from sysibm.sysdummy1));
ERROR 42X74: Invalid CALL statement syntax. (errorCode = 30000)

The patch also adds a regression test case to LangProcedureTest.

I'm running full regression tests now.
> NullPointerException when calling a procedure with sub-query as argument
> ------------------------------------------------------------------------
>                 Key: DERBY-6212
>                 URL: https://issues.apache.org/jira/browse/DERBY-6212
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: derby-6212-01-a.diff
> ij version 10.10
> ij> connect 'jdbc:derby:memory:db;create=true';
> ij> call syscs_util.syscs_set_database_property('abc', (values 'def'));
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'. (errorCode = 0)
> The query should either compile and execute just fine, or it should raise a proper exception.
It should not fail with a NullPointerException.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message