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 "Rick Hillegas (JIRA)" <ji...@apache.org> on 2013/03/12 15:25:12 UTC
[jira] [Updated] (DERBY-6089)
CallableStatement#registerOutParameter on client lacks check of legal
types.
[ 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-02-aa-addCheckToOldOverloads.diff
Attaching derby-6089-02-aa-addCheckToOldOverloads.diff. This patch makes the old overloads behave like the new overloads: If the jdbc type is not a legal Derby data type, then a SQLFeatureNotSupportedException is raised. I am running tests now.
Touches the following files:
--------------
M java/engine/org/apache/derby/impl/sql/GenericParameterValueSet.java
The guts of the change to the embedded driver: check the data type whenever calling registerOutParameter.
--------------
M java/engine/org/apache/derby/impl/jdbc/Util42.java
M java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement42.java
M java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement42.java
M java/engine/org/apache/derby/impl/jdbc/ConnectionChild.java
M java/engine/org/apache/derby/impl/jdbc/Util.java
M java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java
M java/engine/org/apache/derby/impl/jdbc/EmbedResultSet42.java
Some refactoring in order to support the embedded change.
--------------
M java/client/org/apache/derby/client/am/CallableStatement.java
The change to the client driver: check the data type whenever calling registerOutParameter.
--------------
M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest42.java
Add Dag's test case from 6089-repro-old-overloads.diff.
> 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
> Assignee: Rick Hillegas
> Attachments: 6089-repro.diff, 6089-repro-old-overloads.diff, derby-6089-01-aa-addCheckToClient.diff, derby-6089-01-ab-addCheckToClient.diff, derby-6089-02-aa-addCheckToOldOverloads.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