db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <derby-...@db.apache.org>
Subject [jira] Resolved: (DERBY-225) insert of decimal value larger than max succeeds with jdk15
Date Tue, 03 May 2005 00:08:05 GMT
     [ http://issues.apache.org/jira/browse/DERBY-225?page=all ]
     
Daniel John Debrunner resolved DERBY-225:
-----------------------------------------

     Resolution: Fixed
    Fix Version: 10.1.0.0
                     (was: 10.0.2.2)

Handled negative scale values that can be returned by BigDecimal.scale() in J2SE 5.0

Sending        java\engine\org\apache\derby\iapi\types\NumberDataValue.java
Sending        java\engine\org\apache\derby\iapi\types\SQLDecimal.java
Transmitting file data ..
Committed revision 167832.

> insert of decimal value larger than max succeeds with jdk15
> -----------------------------------------------------------
>
>          Key: DERBY-225
>          URL: http://issues.apache.org/jira/browse/DERBY-225
>      Project: Derby
>         Type: Bug
>   Components: JDBC
>     Versions: 10.0.2.1
>     Reporter: Myrna van Lunteren
>     Assignee: Daniel John Debrunner
>      Fix For: 10.1.0.0

>
> On the following table:
>    create table tmp (d decimal(31,0));
> an insert of a value with a precision larger than 31:
>    insert into tmp values (+1.79769E+308);
> Should fail with:
>    ERROR 22003: The resulting value is outside the range for the data type DECIMAL/NUMERIC(31,0).
> However, with jdk15, it does not.
> The expected error is generated from org.apache.derby.iapi.types.SQLDecimal.setWidth(),
which calls getWholeDigits(), which gets the length of a string based on a BigDecimal using
toString, which has a different value using jdk14 vs. jdk15 since the fix for DERBY-38.
> Note: I verified that the fix for DERBY-38 did not per se cause this failure.

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