db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-4889) Different byte to boolean conversion on embedded and client
Date Mon, 08 Nov 2010 18:56:09 GMT

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

Rick Hillegas updated DERBY-4889:
---------------------------------

    Attachment: derby-4889-01-aa-removeSpecialCase.diff

Attaching derby-4889-01-aa-removeSpecialCase.diff. This patch removes a piece of defensive
coding which caused this error. The regression tests passed for me on this patch. In addition,
I ran the compabitility tests using two versions of Derby: 10.6.1.0 and the trunk. Those tests
ran cleanly too. Committed at subversion revision 1032667.

There was a piece of defensive coding in the server-side network code which really didn't
do anything except cause this bug. I removed that code. Now the test cases run correctly.

Touches the following files:

-------------

M      java/drda/org/apache/derby/impl/drda/DRDAConnThread.java

Removed the defensive code which caused the bug.

-------------

Removed a special case which Knut added in order to enable some boolean tests. The special
case canonized wrong results for the network run.

M      java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java


> Different byte to boolean conversion on embedded and client
> -----------------------------------------------------------
>
>                 Key: DERBY-4889
>                 URL: https://issues.apache.org/jira/browse/DERBY-4889
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>         Attachments: derby-4889-01-aa-removeSpecialCase.diff
>
>
> The following code prints "true" with the embedded driver and "false" with the client
driver:
>         PreparedStatement ps = c.prepareStatement("values cast(? as boolean)");
>         ps.setByte(1, (byte) 32);
>         ResultSet rs = ps.executeQuery();
>         rs.next();
>         System.out.println(rs.getBoolean(1));
> If setByte() is replaced with setInt(), they both print "true".

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