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

Reply via email to