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

Dag H. Wanvik updated DERBY-6089:
---------------------------------

    Attachment: 6089-repro-old-overloads.diff

Attaching another repro that shows the behavior of the old overloads: it seems 
they are missing the type check too, but they behave differently for embedded 
and client:
on embedded we see an exception that the datatype is not correct for the 
parameter number (correct, but I would exoect the 
SQLFeatureNotSupportedException for the old overloads, too), and for client, no 
error is thrown in the call to registerOutParameter. So, are both check types 
missing there? 
                
> 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
>
>
> 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

Reply via email to