db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-6089) CallableStatement#registerOutParameter on client lacks check of legal types.
Date Mon, 25 Feb 2013 20:12:13 GMT

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

Rick Hillegas updated DERBY-6089:
---------------------------------

    Attachment: derby-6089-01-aa-addCheckToClient.diff

Attaching derby-6089-01-aa-addCheckToClient.diff. This patch makes the client perform the
same check as the embedded driver for the new CallableStatement.registerOutParameter() overloads.
I will run regression tests.

This patch addresses the first problem described by Dag, the problem with the new overloads.
The patch does not address the follow-on pre-existing problem with the old overloads.


Touches the following files:

------------

M       java/client/org/apache/derby/client/am/PreparedStatement.java
M       java/client/org/apache/derby/client/am/Utils42.java
M       java/client/org/apache/derby/client/am/Agent.java

Factors type checking in the client to mimic the embedded behavior.


------------

M       java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest42.java

Adds Dag's negative case to this test.

                
> CallableStatement#registerOutParameter on client lacks check of legal types.
> ----------------------------------------------------------------------------
>
>                 Key: DERBY-6089
>                 URL: https://issues.apache.org/jira/browse/DERBY-6089
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.10.0.0
>            Reporter: Dag H. Wanvik
>         Attachments: 6089-repro.diff, 6089-repro-old-overloads.diff, derby-6089-01-aa-addCheckToClient.diff
>
>
> Cf the attached negative test in a patch to PreparedStatement42.
> In JDBC 4.2, the Javadoc for registerOutParameter(int parameterIndex,
> int sqlType, String typeName) reads:
> :
> @exception SQLFeatureNotSupportedException if sqlType is a ARRAY,
>  BLOB, CLOB, DATALINK, JAVA_OBJECT, NCHAR, NCLOB, NVARCHAR,
>  LONGNVARCHAR, REF, ROWID, SQLXML or STRUCT data type and the JDBC
>  driver does not support this data type
> :
> For the new overloads, for embedded this is checked inside Util42#getTypeAsInt. The similar
> client method, Utils42#getTypeAsInt does not do this checking.

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

Mime
View raw message