db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-5063) Embedded driver allows updateBytes() on BOOLEAN column
Date Mon, 21 Feb 2011 14:57:38 GMT

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

Knut Anders Hatlen updated DERBY-5063:

    Attachment: derby-5063-1b.diff

Uploading a new patch (1b) which adds a test case. Without the fix, the test case fails with
the embedded driver and passes with the client driver. It passes with both drivers when the
fix is applied.

The removal of setValue(byte[]) in SQLBoolean makes it use the method that it inherits from
DataType, which throws the same exception as we see with the client driver.

All regression tests ran cleanly.

> Embedded driver allows updateBytes() on BOOLEAN column
> ------------------------------------------------------
>                 Key: DERBY-5063
>                 URL: https://issues.apache.org/jira/browse/DERBY-5063
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: derby-5063-1a.diff, derby-5063-1b.diff
> The following code inserts the value TRUE into the table T on the embedded driver:
>         Statement s = c.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
>         s.execute("create table t(b boolean)");
>         ResultSet rs = s.executeQuery("select b from t");
>         rs.moveToInsertRow();
>         rs.updateBytes(1, "this is a test".getBytes());
>         rs.insertRow();
> The client driver fails:
> java.sql.SQLException: An attempt was made to put a data value of type 'byte[]' into
a data value of type 'BOOLEAN'.
> I believe the client driver is correct, and embedded should be changed to match it.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message