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-1610) Updating column typed as CHAR to value passed via setBinaryStream(notNull) is failed because of imcompatiblity of types though it was not taken as error when setBinaryStream(null)
Date Sun, 20 Aug 2006 17:42:15 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1610?page=comments#action_12429278 ] 
            
Knut Anders Hatlen commented on DERBY-1610:
-------------------------------------------

With the DERBY-1610_2.diff patch, setBinaryStream(null), setBlob(null) and setNull(Types.BLOB)
throw exception if they are called on a parameter of type CHAR, VARCHAR, LONGVARCHAR or CLOB.
However, they can still be used to set parameters of other types (for instance SHORT, INTEGER,
FLOAT, DOUBLE and TIMESTAMP) to null. I think it would be better and more consistent behaviour
if all of these failed as well.

In fact, all other setXXX methods can be used to set null values on parameters of all types.
I find it a bit unintuitive that only the combinations mentioned above should raise exceptions.
Is it possible to make the calcJdbcTypeForNullValue() more complete so that all setXXX(null)
calls on parameters of incompatible type throw an exception?

> Updating column typed as CHAR to value passed via setBinaryStream(notNull) is failed
because of imcompatiblity of types though it was not taken as error when setBinaryStream(null)
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1610
>                 URL: http://issues.apache.org/jira/browse/DERBY-1610
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server, Network Client
>            Reporter: Tomohito Nakayama
>         Assigned To: Tomohito Nakayama
>         Attachments: DERBY-1610.diff, DERBY-1610_2.diff, parameterMapping.diff, parameterMapping.diff,
TestNullChar.java
>
>
> There exists difference between updating character typed column to value passed via setBinaryStream(notNullValue)
and updating the column to value passed via setBinaryStream(null).
> This difference is problematic because it does not exist in Embedded mode.

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