Issue Details (XML | Word | Printable)

Key: CORE-4755
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Pavel Zotov
Votes: 0
Watchers: 2
Operations

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

Parameterized exception: wrong output when number of arguments greater than 7

Created: 19/Apr/15 10:43 AM   Updated: 28/May/15 12:59 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0 Beta 2

File Attachments: 1. Zip Archive gen_exc.zip (3 kB)


QA Status: Done successfully


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

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no subversion log entries for this issue yet.