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
Add expression index name to exception message if computation failed [CORE5606] #5872
Comments
Modified by: @livius2Component: Engine [ 10000 ] |
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 4.0 Beta 1 [ 10750 ] |
Commented by: @pavel-zotov It seems that not all build-in functions are covered (among them which can be used in expression index). Consider following script:set list on; commit; set count on; insert into test(id, x) values(0, 1); insert into test(id, r) values(1, 12); insert into test(id, s) values(2, 'ENGINE_VERSION'); insert into test(id, x, y) values(3, 10, 10); insert into test(id, x, y, s) values( 4, 3, -7, 'qwerty' ); set echo off; select id, s from test;Now run it with filtering only STDERR and 'test_eval' prefix from it: C:\MIX\firebird\fb40\isql /:e40 -i c5606.sql 2>&1 | findstr /i /c:test_eval None rows will be added into table: every declared expressions will get actual arguments that break evaluating process (runtime errors will be in every of them).
|
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Deferred Test Details: See note 12/Sep/17 10:51 AM |
Commented by: @asfernandes Fixed. |
Commented by: @pavel-zotov Unfort., in the build WI-T4.0.0.744 (13-sep-2017) output contains only common text of exceptions but INDEX names are not mentioned at all. PS. ,s char(12) default 'DB_NAME' to: ,s varchar(12) default 'DB_NAME' |
Commented by: @asfernandes > Even 'TEST_EVAL1' not present in STDERR like it was before. I cannot reproduce. For the "s" case, error happens on the field constraint level, before index update, so it's correct to not have the new message. SQL> recreate table test( |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: Deferred => Done successfully Test Details: See note 12/Sep/17 10:51 AM => |
Commented by: @pavel-zotov Sorry, me wrong: i used old client library. On build 744 all works fine. |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Commented by: @livius2 Thank you for adding this :) |
Submitted by: @livius2
Will be good to see in which expression index exception was raised and at last that exception was raised by calculated index at all.
e.g.
CREATE TABLE TEST
(
ID INTEGER,
WARTOSC NUMERIC(16,2)
);
CREATE INDEX IXAE_TEST__CALC ON TEST COMPUTED BY((ID+WARTOSC)/0);
INSERT INTO TEST (ID,WARTOSC) VALUES ('4','6.50');
we got exception:
SQL Message : -802
Arithmetic overflow or division by zero has occurred.
Engine Code : 335544321
Engine Message :
arithmetic exception, numeric overflow, or string truncation
Integer divide by zero. The code attempted to divide an integer value by an integer divisor of zero.
and we do not know that this error occured inside expression index at all and do not know in which one.
Commits: 7226b54 f924ded
The text was updated successfully, but these errors were encountered: