db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rami Ojares / PDF-Comics Oy <r...@absinth.fi>
Subject Re: Maximum depth of nested triggers was exceeded.
Date Sat, 16 Jan 2010 22:30:37 GMT
Yes, as I expected.
If I execute those same statements from a separate connection then 
everything works as expected.
No more "Maximum depth of nested triggers was exceeded."
So this is definately a bug.
I am using currently 10.5.3.1

- rami

> Hi,
>
> Now I have confirmed a following (rather alarming) issue.
>
> I have a before trigger on inserting a row in a table.
> That trigger either throws an exception or returns 0.
>
> Now on the client side a create a connection (autoCommit = true)
> And I start inserting rows all of which result in an exception thrown 
> by the before trigger.
> In my trigger function I print to console each time the trigger is 
> entered.
> For the first 16 rows the trigger is entered and throws an exception 
> (as expected).
> But after that the trigger is not entered and "Maximum depth of nested 
> triggers was exceeded." exception is thrown for all the rest of the 
> triggers.
>
> Derby reference says that "The maximum trigger recursion depth is 16."
> But my trigger does not cause other triggers to fire.
> The insert statements are separate transactions but created from the 
> same connection.
> It seems that derby starts adding the trigger recursion counter for 
> completely separate statements?!?
>
> I have to test now if I open a separate connection for each statement 
> what is going to happen.
> Will report soon.
>
> - rami
>
>


Mime
View raw message