Unclear error message when inserting value exceeding max of dec_fixed decimal -----------------------------------------------------------------------------
Key: CORE-5726 URL: http://tracker.firebirdsql.org/browse/CORE-5726 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 4.0 Alpha 1 Environment: Firebird-4.0.0.864-0_x64 (Windows 10) Reporter: Mark Rotteveel Inserting a value that exceeds the precision of a dec_fixed decimal column results in an unclear exception message. Table: create table extdecimal ( id integer generated always as identity primary key, dec34_34 decimal(34, 34) ); Insert: insert into extdecimal(dec34_34) values (1); This yields error: Error: *** IBPP::SQLException *** Context: Statement::Execute( insert into extdecimal(dec34_34) values (1) ) Message: isc_dsql_execute2 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. Instead it should raise error 335544321 (arithmetic exception, numeric overflow, or string truncation) + error 335544916 (numeric value is out of range), as 1 doesn't fit in a decimal(34, 34). With the previous maximum of precision 18, a decimal(18,18) would accept 1-9 (as is actually precision 19 with some caveats), but raise 335544321 + 335544916 when inserting 10 or higher. -- 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