Re: Bug/Crash - IDS11 - Data Collection + SPL with REFERENCING
Posted in 2008
Topics: Stored Procedures & SPL, Error Codes & Troubleshooting, Triggers, Constraints & Referential Integrity
Cesar Inacio Martins wrote:
> Hi,
>
> IDS 11.10 UC1DE , OS SuSE 10.2
>
> I try create a Stored Procedure with trigger references, when I
> execute the script the instance create a Assert Failed and crash.
> After a some tests I discovered the problem is when have a
> collection variable declared on procedure with trigger references.
> When execute the SQL bellow, the same error occur.
>
> The problem apparently is on the memory allocation...
> I want to know if anybody have a idea to do a work around without
> pass parameter on the SPL.
>
> -------------------------- SQL
>
> CREATE table t_tag_perg (
> cod_pergunta integer
> ,cod_tag integer
> )> ;
> CREATE procedure sp_trg_tag_perg()> referencing old as o new as n for t_tag_perg;
> ----------------->>>> when comment the line bellow OR above, the SP
> is created
> define v_tags set(integer not null);
> end procedure
> ;
> -- this code is not are executed... the error occur on the create
> procedure.
> CREATE trigger trg_i_tag_perg insert on t_tag_perg
> for each row (
> execute procedure sp_trg_tag_perg() with trigger references
> )> ;
> -- this code is not are executed... the error occur on the create
> procedure.
> CREATE trigger trg_i_tag_perg delete on t_tag_perg
> for each row (
> execute procedure sp_trg_tag_perg() with trigger references
> )> ;
>
I'm surprised that it caused an AF event, but you can't do what you want
to do. You create the procedure with the expected argument list and
pass values from the trigger's old and new images to the procedure.
There's no other way in Informix's syntax. The stored procedure knows
nothing about old or new.
Art S. Kagel
Oninit
===========================================================================================
Please access the attached hyperlink for an important electronic communications disclaimer:
http://www.oninit.com/home/disclaimer.php
===========================================================================================
On Feb 11, 6:22 pm, "Art S. Kagel (Oninit LLC)" <a...@oninit.com>
wrote:
> Cesar Inacio Martins wrote:
> > Hi,
>
> > IDS 11.10 UC1DE , OS SuSE 10.2
>
> > I try create a Stored Procedure with trigger references, when I
> > execute the script the instance create a Assert Failed and crash.
> > After a some tests I discovered the problem is when have a
> > collection variable declared on procedure with trigger references.
> > When execute the SQL bellow, the same error occur.
>
> > The problem apparently is on the memory allocation...
> > I want to know if anybody have a idea to do a work around without
> > pass parameter on the SPL.
>
> > -------------------------- SQL
>
> > CREATE table t_tag_perg (
> > cod_pergunta integer
> > ,cod_tag integer
> > )> > ;
> > CREATE procedure sp_trg_tag_perg()> > referencing old as o new as n for t_tag_perg;
> > ----------------->>>> when comment the line bellow OR above, the SP
> > is created
> > define v_tags set(integer not null);
> > end procedure
> > ;
> > -- this code is not are executed... the error occur on the create
> > procedure.
> > CREATE trigger trg_i_tag_perg insert on t_tag_perg
> > for each row (
> > execute procedure sp_trg_tag_perg() with trigger references
> > )> > ;
> > -- this code is not are executed... the error occur on the create
> > procedure.
> > CREATE trigger trg_i_tag_perg delete on t_tag_perg
> > for each row (
> > execute procedure sp_trg_tag_perg() with trigger references
> > )> > ;
>
> I'm surprised that it caused an AF event, but you can't do what you want
> to do. You create the procedure with the expected argument list and
> pass values from the trigger's old and new images to the procedure.
> There's no other way in Informix's syntax. The stored procedure knows
> nothing about old or new.
>
> Art S. Kagel
> Oninit
>
> ===========================================================================================
> Please access the attached hyperlink for an important electronic communications disclaimer:
>
> http://www.oninit.com/home/disclaimer.php
>
> ===========================================================================================
This is a new feature of 11. You can create trigger procudures
(you'll note the create trigger execute procudure with references
syntax that allows the procedure to use the old and new stuff). I was
able to duplicate the crash using 11.10.UC1 on Solaris so it isn't
specific to Linux. Didn't get a lot of time to play around seeing if
there's a workaround, but it certainly does appear to be a bug.
Jacques