db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Nielsen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3290) Derby cannot store java Double or Float values .NaN and .[POSITIVE|NEGATIVE]_INFINITY
Date Wed, 19 Dec 2007 13:28:43 GMT

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

Thomas Nielsen updated DERBY-3290:
----------------------------------

    Attachment: TestNaN.java

Attaching small repro java app using PreparedStatement.setDouble() and setFloat() in combination
with NaN, POSITIVE_INFINITY, and NEGATIVE_INFINITY.

Sample call stack from insert attempt for Double.NaN:
---
java.sql.SQLException: The resulting value is outside the range for the data type DOUBLE.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:202)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:391)
        at org.apache.derby.impl.jdbc.EmbedResultSet.noStateChangeException(EmbedResultSet.java:4381)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setDouble(EmbedPreparedStatement.java:473)
        at TestNaN.test(TestNaN.java:52)
        at TestNaN.test(TestNaN.java:24)
        at TestNaN.main(TestNaN.java:19)
Caused by: ERROR 22003: The resulting value is outside the range for the data type DOUBLE.
        at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:290)
        at org.apache.derby.iapi.types.NumberDataType.normalizeDOUBLE(NumberDataType.java:539)
        at org.apache.derby.iapi.types.SQLDouble.setValue(SQLDouble.java:412)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setDouble(EmbedPreparedStatement.java:470)
        ... 3 more
---

> Derby cannot store java Double or Float values .NaN and .[POSITIVE|NEGATIVE]_INFINITY
> -------------------------------------------------------------------------------------
>
>                 Key: DERBY-3290
>                 URL: https://issues.apache.org/jira/browse/DERBY-3290
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Thomas Nielsen
>            Priority: Minor
>         Attachments: TestNaN.java
>
>
> Issue originally reported on derby-user, where user cannot store .NaN or .INFINITE for
java datatypes Double or Float.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message