WHEN <list of exceptions> tracks only the dependency on the first exception in PSQL. [CORE1165] #1588
Labels
affect-version: 0.9
affect-version: 0.9.4
affect-version: 0.9.5
affect-version: 1.0.0
affect-version: 1.0.1
affect-version: 1.0.2
affect-version: 1.0.3
affect-version: 1.5.0
affect-version: 1.5.1
affect-version: 1.5.2
affect-version: 1.5.3
affect-version: 1.5.4
affect-version: 2.0.0
affect-version: 2.0.1
affect-version: 2.0.2
component: engine
fix-version: 2.1 Beta 1
priority: major
qa: done successfully
type: bug
Submitted by: Claudio Valderrama C. (robocop)
Assigned to: Claudio Valderrama C. (robocop)
Is related to QA76
The example is silly because I had to create the simplest test case to demonstrate a bug I found in the source code:
set term ^;
drop procedure p^
recreate exception e1 'e1'^
recreate exception e2 'e2'^
create procedure p as begin
begin end
when exception e1, exception e2 do begin end
end^
show depend p^
set term ;^
The output is
E1:Exception
+++
The output should be instead
E2:Exception, E1:Exception
+++
The proof of the bug is to issue:
recreate exception e1 'e1';
recreate exception e2 'e2';
after the script shown above. Recreating e1 fails due to dependencies but recreating e2 succeeds. With correct dependencies tracking, both should fail.
In the case of
drop exception e2;
the procedure will get a BLR error the next time it's run but after all clients disconnect from the db (due to procedure caching logic).
The problem is a copy/paste in the code from par_condition into par_conditions (note singular v/s plural).
The bug predates the FB project, as seen here:
http://firebird.cvs.sourceforge.net/firebird/interbase/jrd/par.c?revision=1.1&view=markup
It was inherited from IB.
(This message is being copy/pasted, too.)
Commits: c5a711e
The text was updated successfully, but these errors were encountered: