Altering a trigger indicating other table than the original does not reflect 
the change
---------------------------------------------------------------------------------------

                 Key: CORE-4846
                 URL: http://tracker.firebirdsql.org/browse/CORE-4846
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 2.5.4
         Environment: Windows 2008 Foundation
            Reporter: Alvaro Castiello
            Priority: Minor


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;



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to