Issue Details (XML | Word | Printable)

Key: CORE-5876
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: Karol Bieniaszewski
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Provide name of udf function for "arithmetic exception, numeric overflow, or string truncation"

Created: 17/Jul/18 11:18 AM   Updated: 02/Aug/18 09:13 AM
Component/s: Engine
Affects Version/s: 3.0.4
Fix Version/s: 3.0.4, 4.0 Beta 1

QA Status: Done successfully


 Description  « Hide
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

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alexander Peshkov added a comment - 23/Jul/18 08:26 AM
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.

Karol Bieniaszewski added a comment - 23/Jul/18 02:39 PM
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 ;-)

Karol Bieniaszewski added a comment - 02/Aug/18 09:13 AM
Thank you very much, it is working :)