You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the values list contain a iif and that field is in the matching clause i got an error .
/*
cant format message 13:896 -- message file C:\windows\firebird.msg not found.
invalid request BLR at offset 43.
unknown ISC error 335545059.
*/
But in firebird 2.5 it works.
e.g.
CREATE TABLE "ATest" (
PK INTEGER NOT NULL,
A INTEGER,
B INTEGER
);
ALTER TABLE "ATest" ADD CONSTRAINT "PK_ATest" PRIMARY KEY (PK);
CREATE OR ALTER VIEW "VW_ATest"(
PK,
A,
B)
AS
select
pk,
a,
b
from "ATest"
;
SET TERM ^ ;
CREATE OR ALTER TRIGGER "VW_ATest_BU" FOR "VW_ATest"
ACTIVE BEFORE UPDATE POSITION 0
AS
BEGIN
POST_EVENT 'DUMMY_EVENT';
END
^
CREATE OR ALTER TRIGGER "VW_ATest_BU" FOR "VW_ATest"
ACTIVE BEFORE UPDATE POSITION 0
as
begin
update or insert into "ATest" ( PK , A , B)
!!! Here comes the problem with iif !!!!!!!!!!!!!!!!
values (http://new.pk , iif( 1 = 1 , 2 ,3) , new.b )
Another problem rdb$get_context worked in 2.5 but not in firebird 3
values ( rdb$get_context( 'USER_SESSION' , 'MANDANT_GP_ID' ) , new."Gesch_Partner_ID" , new."RGMGP_RabattGruppenID" )
summary: trigger with update or insert iif not in matching value => Regression: Trigger with UPDATE OR INSERT statement and IIF() not working as expected
Submitted by: Sascha Michel (datiscum1)
When the values list contain a iif and that field is in the matching clause i got an error .
/*
cant format message 13:896 -- message file C:\windows\firebird.msg not found.
invalid request BLR at offset 43.
unknown ISC error 335545059.
*/
But in firebird 2.5 it works.
e.g.
CREATE TABLE "ATest" (
PK INTEGER NOT NULL,
A INTEGER,
B INTEGER
);
ALTER TABLE "ATest" ADD CONSTRAINT "PK_ATest" PRIMARY KEY (PK);
CREATE OR ALTER VIEW "VW_ATest"(
PK,
A,
B)
AS
select
pk,
a,
b
from "ATest"
;
SET TERM ^ ;
CREATE OR ALTER TRIGGER "VW_ATest_BU" FOR "VW_ATest"
ACTIVE BEFORE UPDATE POSITION 0
AS
BEGIN
POST_EVENT 'DUMMY_EVENT';
END
^
CREATE OR ALTER TRIGGER "VW_ATest_BU" FOR "VW_ATest"
ACTIVE BEFORE UPDATE POSITION 0
as
begin
update or insert into "ATest" ( PK , A , B)
!!! Here comes the problem with iif !!!!!!!!!!!!!!!!
values (http://new.pk , iif( 1 = 1 , 2 ,3) , new.b )
matching( pk , a );
end
^
SET TERM ; ^
Commits: c933fad FirebirdSQL/fbt-repository@d72a2dc
====== Test Details ======
Confirmed on WI-T3.0.0.31374 Firebird 3.0 Beta 1:
Statement failed, SQLSTATE = HY000
invalid request BLR at offset 51
-undefined variable number
The text was updated successfully, but these errors were encountered: