ROUND() of INT128 number requires is to be explicitly cased to INT128 ---------------------------------------------------------------------
Key: CORE-6356 URL: http://tracker.firebirdsql.org/browse/CORE-6356 Project: Firebird Core Issue Type: Bug Components: Engine Reporter: Pavel Zotov SQL> set sqlda_display on; SQL> select round(170141183460469231731687303715884105727,1) from rdb$database; INPUT message field count: 0 OUTPUT message field count: 1 01: sqltype: 32752 INT128 scale: 0 subtype: 0 len: 16 : name: ROUND alias: ROUND : table: owner: ROUND ============================================= Statement failed, SQLSTATE = 22003 arithmetic exception, numeric overflow, or string truncation -numeric value is out of range SQL> But: SQL> select round( cast(170141183460469231731687303715884105727 as int128),0) from rdb$database; -- works fine: INPUT message field count: 0 OUTPUT message field count: 1 01: sqltype: 32752 INT128 scale: 0 subtype: 0 len: 16 : name: ROUND alias: ROUND : table: owner: ROUND ============================================= 170141183460469231731687303715884105727 -- 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