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
Parameterized exception: wrong output when number of arguments greater than 7 [CORE4755] #5059
Comments
Modified by: @pavel-zotovAttachment: gen_exc.zip [ 12710 ] |
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: @asfernandes Maximum number of arguments was @7. I increased to 9. That in mind, there were no bug. @10 is just @1 followed by a literal 0. I'm now rejecting argument list with more than 9 parameters in compile time. |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Beta 2 [ 10586 ] |
Commented by: @pavel-zotov > I'm now rejecting argument list with more than 9 parameters in compile time. IMHO, it will be nice if doc/readme.*.txt will reflect this limitation. |
Commented by: @asfernandes Yep, look at it. |
Commented by: @asfernandes Thanks. |
Submitted by: @pavel-zotov
Attachments:
gen_exc.zip
The following batch generates .sql with declaration of exception that accepts arbitrary number of arguments (defined as %1 for this batch) and also it adds EXECUTE BLOCK for testing such exception.
For example, if this batch is called like this:
C:\> gen_exc.bat 3
-- it will create .sql with text:
recreate exception ex_surprised 'OMG... Look what I''ve got:
@1
@2
@3
';
commit;
set term ^;
execute block as
declare v_1 int = 12346;
declare v_2 int = 12347;
declare v_3 int = 12348;
begin
exception ex_surprised using(
v_1
,v_2
,v_3
);
end
^
set term ;^
This .sql will output in STDERR:
Statement failed, SQLSTATE = HY000
exception 12
-EX_SURPRISED
-OMG... Look what I've got:
12346
12347
12348
When I call this batch with argument = 165 the following output will be produced:
Statement failed, SQLSTATE = HY000
exception 13
-EX_SURPRISED
-OMG... Look what I've got:
12346
12347
12348
12349
12350
12351
12352
@8
@9
123460
123461
. . .
123528
123529
@80
@81
@82
@83
@84
@85
@86
@87
@88
@89
@90
@91
@92
@93
@94
@95
@96
@97
@98
@99
1234600
1234601
. . .
1234643
1234644
1234645
123464...
(see attached file).
So, the questions are:
1) what is the maximum of arguments to parametrized exception ?
2) if no upper limit is defined then how this output can be explained:
2.1) @8, @9 and @80 ... @99 instead of actual values;
2.2) values after '@9' are 10 times larger, values after @99 are 100 times larger than proper;
2.3) values after 163th argument aren't displayed.
WI-T3.0.0.31794
Commits: dd2411e FirebirdSQL/fbt-repository@35ec1ff
The text was updated successfully, but these errors were encountered: