Inconsistent behaviour of the NEW context variable in AFTER UPDATE OR DELETE
triggers
-------------------------------------------------------------------------------------
Key: CORE-6144
URL: http://tracker.firebirdsql.org/browse/CORE-6144
Project: Firebird Core
Issue Type: Bug
Components: Engine
Affects Versions: 2.5.9, 4.0 Beta 1, 3.0.4
Reporter: Ilya Eremin
Script to reproduce:
create table test (id integer not null primary key);
commit;
insert into test (id) values (1);
commit;
alter table test add v integer default 1 not null;
commit;
insert into test (id) values (2);
create exception ex 'Failed';
set term ^;
create or alter trigger test_null for test
after update or delete
as
begin
if (new.v is not null) then -- new.v should be NULL if the trigger runs after
DELETE statement
exception ex;
end^
set term ;^
commit;
delete from test where id = 2; -- no errors
delete from test where id = 1; -- trigger throws exception
I am working on a PR.
--
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
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel