db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1494) PreparedStatement.setNull(int, int) checks type compatibility on embedded, but not on the client
Date Mon, 10 Jul 2006 08:43:30 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1494?page=comments#action_12420005 ] 

Knut Anders Hatlen commented on DERBY-1494:
-------------------------------------------

Although both implementations of setNull(int,int) are compliant, I think it would make more
sense to change the embedded driver to match the client driver than vice versa. The embedded
driver doesn't use the sqlType parameter for other purposes than checking type compatibility.
Since null is compatible with all types in Derby, the type parameter could just as well be
ignored. Changing embedded to match the client would cause less cases to fail and make it
easier to move from DMBSs which treat the type parameter more liberally (for instance, MySQL,
PostgreSQL and HSQLDB).

> PreparedStatement.setNull(int, int) checks type compatibility on embedded, but not on
the client
> ------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1494
>          URL: http://issues.apache.org/jira/browse/DERBY-1494
>      Project: Derby
>         Type: Bug

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Knut Anders Hatlen
>     Priority: Minor

>
> When PreparedStatement.setNull(int, int) is called, the embedded driver will check whether
the sqlType parameter specifies a type which is compatible with the actual parameter type.
If the types are not compatible, an exception is thrown. The client driver does not check
whether the types are compatible, and does not throw an exception.
> Both drivers behave according to the spec, but one of them should be changed to match
the other one.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message