Issue Details (XML | Word | Printable)

Key: DERBY-74
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Jeremy Boynes
Votes: 0
Watchers: 0
Operations

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

SQLDecimal.getWholeDigits returns invalid result on JDK1.5.0

Created: 21/Nov/04 11:53 PM   Updated: 13/Dec/07 09:04 AM
Return to search
Component/s: SQL
Affects Version/s: 10.1.1.0
Fix Version/s: 10.1.1.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works derby_getWholeDigits_jdk15.patch 2004-11-22 12:25 AM Jeremy Boynes 3 kB
Environment: JDK1.5.0

Resolution Date: 23/Nov/04 07:29 PM


 Description  « Hide
With JDK1.5.0 the behaviour of BigDecimal.toString() has changed (thanks Sun) and for numbers < 1e-6 it now returns a String in exponential syntax. This causes the number of digits to be calculated incorrectly.

As a result, the ejbql test fails as the following snippet fails:
create table myDecimal (b DECIMAL(31,31))
insert into myDecimal VALUES(1e-30)


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jeremy Boynes made changes - 22/Nov/04 12:25 AM
Field Original Value New Value
Attachment derby_getWholeDigits_jdk15.patch [ 18199 ]
Daniel John Debrunner made changes - 23/Nov/04 07:29 PM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Kathey Marsden made changes - 08/Jul/06 10:02 AM
Fix Version/s 10.1.1.0 [ 10993 ]
Affects Version/s 10.1.1.0 [ 10993 ]
Andrew McIntyre made changes - 13/Dec/07 09:04 AM
Status Resolved [ 5 ] Closed [ 6 ]