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 added a comment - 22/Nov/04 12:25 AM
patch that stops the exception on insert
still passes derbylang tests with JDK1.4.2
however, text generated by ij is still different resulting in failures on JDK1.5.0

Jeremy Boynes added a comment - 22/Nov/04 12:27 AM
previous patch also fixed a couple of JavaDoc errors and unused imports in SQLDecimal.java

Daniel John Debrunner added a comment - 23/Nov/04 07:29 PM
Patch applied as-is.

Sending java/engine/org/apache/derby/iapi/types/SQLDecimal.java
Transmitting file data .
Committed revision 106329.

Andrew McIntyre added a comment - 13/Dec/07 09:04 AM
This issue has been resolved for over a year with no further movement. Closing.