New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide name of udf function for "arithmetic exception, numeric overflow, or string truncation" [CORE5876] #6135
Comments
Modified by: @livius2description: This is important to know the reason of the error - especially if it is caused by udf function DECLARE EXTERNAL FUNCTION SUBSTR ----------------------------------------------------------------- SELECT SUBSTR(CAST('abc' AS CHAR(1500)) || '123', 1, 1000) FROM RDB$DATABASE ----------------------------------------------------------------- SQL Message : -802 Engine Code : 335544321 ----------------------------------------------------------------- SQL Message : -802 Engine Code : 335544321 => This is important to know the reason of the error - especially if it is caused by udf function DECLARE EXTERNAL FUNCTION SUBSTR ----------------------------------------------------------------- SELECT SUBSTR(CAST('abc' AS CHAR(1500)) || '123', 1, 1000) FROM RDB$DATABASE ----------------------------------------------------------------- SQL Message : -802 Engine Code : 335544321 ----------------------------------------------------------------- SQL Message : -802 Engine Code : 335544321 |
Modified by: @AlexPeshkoffassignee: Alexander Peshkov [ alexpeshkoff ] |
Commented by: @AlexPeshkoff Karol, UDFs are deprecated since FB4. Therefore I tend to reject this item - if UDFs cause problems to you { ough, they do it by design :( } please consider rewriting them to UDRs. |
Commented by: @livius2 I understand your point of view but as you say udf will be only depricated in FB4. Then udf will be available many years as first must be released fb5 and fb4 will be still maitained until fb6 or maybe fb7 ;-) |
Modified by: @AlexPeshkoffstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 4.0 Beta 1 [ 10750 ] Fix Version: 3.0.4 [ 10863 ] |
Modified by: @AlexPeshkoffissuetype: New Feature [ 2 ] => Improvement [ 4 ] |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Done successfully |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Commented by: @livius2 Thank you very much, it is working :) |
Submitted by: @livius2
This is important to know the reason of the error - especially if it is caused by udf function
Especially if you do insert into from select - you do not know the reason
DECLARE EXTERNAL FUNCTION SUBSTR
CSTRING(80), Smallint, Smallint
RETURNS CSTRING(80)
ENTRY_POINT 'IB_UDF_substr'
MODULE_NAME 'ib_udf.dll';
-----------------------------------------------------------------
SELECT SUBSTR(CAST('abc' AS CHAR(1500)) || '123', 1, 1000) FROM RDB$DATABASE
-----------------------------------------------------------------
SQL Message : -802
Arithmetic overflow or division by zero has occurred.
Engine Code : 335544321
Engine Message :
arithmetic exception, numeric overflow, or string truncation
string right truncation
expected length 80, actual 1503
-----------------------------------------------------------------
for not udf functions we have name of problematic function "At function 'BBB' line: 6, col: 1"
SQL Message : -802
Arithmetic overflow or division by zero has occurred.
Engine Code : 335544321
Engine Message :
arithmetic exception, numeric overflow, or string truncation
string right truncation
expected length 100, actual 103
At function 'BBB' line: 6, col: 1
Commits: decb92d 1a40ca6
The text was updated successfully, but these errors were encountered: