DECFLOAT should disallow +/-NaN, +/-sNaN and +/-Infinity --------------------------------------------------------
Key: CORE-5699 URL: http://tracker.firebirdsql.org/browse/CORE-5699 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 4.0 Alpha 1 Reporter: Mark Rotteveel The datatype DECFLOAT currently supports storing +/-NaN, +/-sNaN and +/-Infinity (because the underlying Decimal64 / Decimal128 supports that), this should be disallowed and when attempting to store these values, a "data exception — numeric value out of range" error (or equivalent) should be raised. Storing these values can be achieved by either storing it using parameters, or using conversion from string. See also SQL:2016, 6.29 <numeric value expression>. Currently Firebird already disallows overflow to +/- Infinity during calculations with DECFLOAT, nor is it (or should it be possible) to produce NaN during calculation. Currently, storing +/-NaN or +/-sNaN in a column can lead to problems, for example in a select with a condition involving a decfloat column, having a NaN in that column leads to an error during fetch: ==== *** IBPP::SQLException *** Context: Statement::Fetch Message: isc_dsql_fetch failed. SQL Message : -901 Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements Engine Code : 335545141 Engine Message : Decimal float invalid operation. An indeterminant error occurred during an operation. ==== -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel