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] Commented: (DERBY-4965) Boolean to char conversion results in integer
Date Tue, 11 Jan 2011 15:14:47 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980137#action_12980137
] 

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

Some issues with the 1a patch:

1) Two failures in NullIfTest (expected:<[1]> but was:<[true]>)

2) trunk client against 10.7 server gives ClassCastException when calling PreparedStatement.setBoolean()

3) The patch only partially fixes the problem on the client side. It addresses setBoolean(),
but not setObject(). It fixes both in the embedded driver

> Boolean to char conversion results in integer
> ---------------------------------------------
>
>                 Key: DERBY-4965
>                 URL: https://issues.apache.org/jira/browse/DERBY-4965
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.7.1.1
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: derby-4965-1a.diff
>
>
> Seen when running the Java EE CTS on Derby 10.7.1.1. The following code results in "1"
being printed, whereas the expected result is "true":
>         PreparedStatement ps = c.prepareStatement("values cast(? as char(10))");
>         ps.setObject(1, Boolean.TRUE, Types.CHAR);
>         ResultSet rs = ps.executeQuery();
>         rs.next();
>         System.out.println(rs.getString(1));
> Same seen when using VARCHAR or LONGVARCHAR instead of CHAR, and when using setBoolean()
instead of setObject().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message