trigger with update or insert  iif not in matching value 
---------------------------------------------------------

                 Key: CORE-4622
                 URL: http://tracker.firebirdsql.org/browse/CORE-4622
             Project: Firebird Core
          Issue Type: Bug
         Environment: Linux x64 Firebird-3.0.0.31441 
            Reporter: Sascha Michel
            Priority: Trivial


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 (new.pk , iif( 1 = 1 ,  2 ,3) , new.b )

  matching( pk , a );


end
^

SET TERM ; ^



-- 
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

        

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to