db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: Trigger function broken in 10.4.1.3?
Date Tue, 10 Jun 2008 18:19:30 GMT
Hi Thiyagu,

Thanks for finding this and supplying a reproducible test case. I have 
created DERBY-3718 to track this regression.

Regards,
-Rick

Thiyagu P wrote:
> Hi,
>
> Getting null pointer exception when a trigger gets invoked.
>  
> Steps to recreate :
> 1. Created new db and execute the following stmts
> 2. CREATE TABLE TRADE(
>       ID INT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (START WITH 
> 1000),
>       BUYID INT NOT NULL,
>       QTY FLOAT(2) NOT NULL
>    );
>   
>    CREATE TABLE TOTAL(BUYID INT NOT NULL, TOTALQTY FLOAT(2) NOT NULL);
>
>    CREATE TRIGGER TRADE_INSERT
>      AFTER INSERT ON TRADE
>      REFERENCING NEW AS NEWROW
>      FOR EACH ROW MODE DB2SQL
>      UPDATE TOTAL SET TOTALQTY = NEWROW.QTY WHERE BUYID = NEWROW.BUYID;
>
>    INSERT INTO TOTAL VALUES (1, 0);
>
>    INSERT INTO TRADE VALUES(1, 1, 1, 10);
>
> Same thing work fine in 10.3.3.0 <http://10.3.3.0>.
>
>
> Thanks,
> Thiyagu
>
>
>


Mime
View raw message