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 Maximum depth of nested triggers was exceeded.
Date Sat, 16 Jan 2010 22:15:15 GMT

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

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

View raw message