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

Altering a trigger indicating other table than the original does not reflect the change [CORE4846] #5142

Closed
firebird-automations opened this issue Jun 23, 2015 · 3 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Alvaro Castiello (acastiello)

Votes: 1

Not quite sure it this is a bug but at least, I guess another better message should be flagged

a) I created a trigger ANYNAME for a table
create or alter trigger ANYNAME for TABLE1 before insert as
begin
-- code that uses columns from TABLE1
end;

b) I realized that the trigger was not for TABLE1 but for ANOTHERTABLE, so I issued:
create or alter trigger ANYNAME for ANOTHERTABLE before insert as
begin
-- code that uses columns from ANOTHERTABLE
end;

The code refused to compile, claiming new.columnfromANOTHERTABLE was unknown. Realizing what happened I just dropped the trigger ANYNAME and everything ran fine, but I guess "Trigger table can not be modified"

c) Even if you don´t refer to columns in ANOTHERTABLE the trigger is still attached to TABLE1 (In my opinion this is indeed a bug)

create or alter trigger ANYNAME for ANOTHERTABLE before insert as
begin
-- code that does not use any column from ANOTHERTABLE
-- ¡the trigger will still refer to TABLE1 events!
end;

Commits: 04b3f23 FirebirdSQL/fbt-repository@ca4811f

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 RC 1 [ 10584 ]

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

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