Decfloat bind BIGINT,n with resulting value with 11 digits or more fail with Decimal float invalid operation. An indeterminant error occurred during an operation. -------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: CORE-6181 URL: http://tracker.firebirdsql.org/browse/CORE-6181 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 4.0 Beta 2 Environment: Firebird-4.0.0.1641-0_x64 on Windows 10 Reporter: Mark Rotteveel Conversions from a DECFLOAT using SET DECFLOAT BIND BIGINT,n fails when the resulting NUMERIC(18,n) value has 11 digits or more. The resulting error is: Statement failed, SQLSTATE = 22000 Decimal float invalid operation. An indeterminant error occurred during an operation. Example: SQL> set decfloat bind bigint,3; SQL> select cast('1234567.890' as DECFLOAT(34)) from rdb$database; CAST ===================== 1234567.890 SQL> select cast('1234567.8901' as DECFLOAT(34)) from rdb$database; CAST ===================== 1234567.890 SQL> select cast('12345678.901' as DECFLOAT(34)) from rdb$database; CAST ===================== Statement failed, SQLSTATE = 22000 Decimal float invalid operation. An indeterminant error occurred during an operation. SQL> select cast('123456789.0' as DECFLOAT(34)) from rdb$database; CAST ===================== Statement failed, SQLSTATE = 22000 Decimal float invalid operation. An indeterminant error occurred during an operation. It looks like an artificial limit of 10 digits is enforced, while a BIGINT can support 18-19 digits. Expected behaviour is that with BIGINT,3 select cast('9223372036854775.807' as DECFLOAT(34)) from rdb$database will yield exactly 9223372036854775.807 (9223372036854775807 is the maximum value of a 64 bit integer). As a datapoint, this worked fine in build 1575, but fails in 1614 (I don't have build in between those numbers). Build 1614 is just after the INT128 changes. -- 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 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel