Issue Details (XML | Word | Printable)

Key: DERBY-225
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Daniel John Debrunner
Reporter: Myrna van Lunteren
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

insert of decimal value larger than max succeeds with jdk15

Created: 15/Apr/05 02:47 AM   Updated: 12/Jul/06 01:40 AM
Return to search
Component/s: JDBC
Affects Version/s: 10.0.2.1
Fix Version/s: 10.1.1.0

Time Tracking:
Not Specified

Resolution Date: 03/May/05 08:59 AM


 Description  « Hide
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.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Daniel John Debrunner made changes - 22/Apr/05 04:12 AM
Field Original Value New Value
Assignee Daniel John Debrunner [ djd ]
Daniel John Debrunner added a comment - 03/May/05 08:59 AM
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.

Daniel John Debrunner made changes - 03/May/05 08:59 AM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 10.1.0.0 [ 10993 ]
Fix Version/s 10.0.2.2 [ 10992 ]
Resolution Fixed [ 1 ]
Myrna van Lunteren made changes - 12/Jul/06 01:40 AM
Status Resolved [ 5 ] Closed [ 6 ]