Skip to content
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

trigger with except-s on view with union [CORE190] #517

Closed
firebird-automations opened this issue Dec 6, 2001 · 3 comments
Closed

trigger with except-s on view with union [CORE190] #517

firebird-automations opened this issue Dec 6, 2001 · 3 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @ibaseru

SFID: 489764#⁠
Submitted By: kdv

Again bug with view containing union and triggers.
This was found testing bug
[ #⁠489762 ] trigger on view with union receive nulls

Trigger with 2 exceptions can't be created on view with union.

/* begin script */

CREATE TABLE A (ID INTEGER);

CREATE VIEW V1 (VID) AS
SELECT ID FROM A
UNION ALL
SELECT ID FROM A;

/* UNION or UNION ALL does not makes difference for the bug */

CREATE EXCEPTION EXA 'A';
CREATE EXCEPTION EXB 'B';

COMMIT WORK;

set term ^;

CREATE TRIGGER TV1 FOR V1
ACTIVE BEFORE UPDATE
AS
BEGIN
IF (new.VID = 0) THEN
EXCEPTION EXA;
ELSE
EXCEPTION EXB;
END^

/* here is all Ok, trigger has been created */

COMMIT WORK;

Unsuccessful execution caused by system error that does not preclude successful execution of
subsequent statements.
bad BLR -- invalid stream.

Now I can do only rollback. Also I must note that trigger was created, i.e. if I try to
repeat CREATE TRIGGER, there will be a message 'trying to store duplicate ...'.

Removing one of exception call will remove "bad BLR" message too.
And, creating same trigger on view without union will not have this error.
Tested on FB 1.0.0 builds 555 (RC1), 608 and 641 for Windows, W2K Prof, SP2.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 10214 ] => Firebird [ 14442 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test => Done successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants