[
https://issues.apache.org/jira/browse/DERBY-5546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174212#comment-13174212
]
Dag H. Wanvik commented on DERBY-5546:
--------------------------------------
Embedded uses Math.floor on the double/float value supplied to updateDouble, no
error is given in either 1.1 or 0.1 case.
In the case of updateLong(1, Long.MAX_VALUE) on a REAL column, Derby also loses
precision with no error. Embedded just
assigns the long directly to a float value. So it seems we mostly ignore
precision loss.
On the other hand, for SQL REAL/DOUBLE "*" and "/", we do give error under
underflow to zero, e.g in SQLDouble#times, so the picture is mixed..
> ResultSet#updateBigDecimal on a REAL column does not do underflow checking
> --------------------------------------------------------------------------
>
> Key: DERBY-5546
> URL: https://issues.apache.org/jira/browse/DERBY-5546
> Project: Derby
> Issue Type: Bug
> Components: JDBC
> Affects Versions: 10.8.2.2
> Reporter: Dag H. Wanvik
> Priority: Minor
> Attachments: MissingUnderflowCheck.java, derby-5546.diff,
> derby-5546.stat
>
>
> In contrast, ResultSet#updateBigDecimal on a FLOAT or DOUBLE column gives the
> expected error on underflow. Cf. the attached repro program
> MissingUnderflowCheck.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira