db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5536) Client's ResultSet#getLong does not range check when converting from a DECIMAL column
Date Tue, 20 Dec 2011 03:21:32 GMT

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

Dag H. Wanvik updated DERBY-5536:
---------------------------------

    Attachment: derby-5536.stat
                derby-5536.diff

Uploading derby-5536 which changes the implementation of am.Decimal#getLong to allow it to
detect overflow. If the number of digits indicate it can't happen we use an optimized path.
Uncommented a overflow test case in ParameterMappingTest which was disabled due to this error
and and added a new positive test case since we changed the implementation. 

Running regressions.
                
> Client's ResultSet#getLong does not range check when converting from a DECIMAL column
> -------------------------------------------------------------------------------------
>
>                 Key: DERBY-5536
>                 URL: https://issues.apache.org/jira/browse/DERBY-5536
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>            Reporter: Dag H. Wanvik
>         Attachments: MissingRangeCheck.java, derby-5536.diff, derby-5536.stat
>
>
> Derby's DECIMAL can contain an integer of 31 digits. This can overflow a long. The embedded
JDBC driver catches this, but the client does not and can yield a corrupt long, cf enclosed
repro.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message