You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2012/12/28 18:44:13 UTC

[jira] [Assigned] (DERBY-2516) Network Client allows execution of callable statement when one of the parameters is not set

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

Knut Anders Hatlen reassigned DERBY-2516:
-----------------------------------------

    Assignee: Knut Anders Hatlen

The problem appears to be caused by client.am.PreparedStatement.checkThatAllParametersAreSet(), which checks that every parameter is either set or registered as an out parameter. In the failing test case, parameter 1 is registered as an output parameter, so checkThatAllParametersAreSet() thinks everything is OK. However, since it's an INOUT parameter it needs to be set even if it has been registered as an out parameter.

We should make checkThatAllParametersAreSet() always raise an exception if an INOUT parameter isn't set.
                
> Network Client allows execution of callable statement when one of the parameters is not set
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2516
>                 URL: https://issues.apache.org/jira/browse/DERBY-2516
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.3.1.4
>            Reporter: Kathey Marsden
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>              Labels: derby_triage10_8
>
> If the second input parameter is set and the first is not.  Client allows execution of the stored procedure.  See the following code in LangProcedureTest.java with a reference to this bug.
>             op.clearParameters();
>             op.setString(2, "2");
>             try {
>                 // a not set
>                     op.execute();                
>                     fail("FAIL - a  not set");
>             } catch (SQLException sqle) {
>                 assertSQLState("07000", sqle);
>             }
>         

--
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