It should be quite clear that it is impossible to put this condition in a simple test case.
Here is my test case in pseudocode.

CREATE 4 tables
A and B that have an update trigger that updates tables C and D

A --update trigger--> C
A --update trigger--> D

B --update trigger--> C
B --update trigger--> D

Run 2 sessions at the same time so that
- session updating A locks C in it's first update trigger
- session updating B locks D in it's first update trigger

And thus they both wait on each other so a deadlock is detected.
Whichever session came second is rollec back

But since we are in a trigger rollback is not allowed.
It does not seem to me a big bug.
It seems to only cause one nuisance which is erroneous error reporting.
Instead of deadlock exception one gets rollback not allowed inside trigger exception.
I suppose the session is rolled back in both cases as is supposed to be.

Here the ability to define ordering to triggers becomes evident again.

- rami

Thomas Mueller wrote:
Hi,

In Command.executeUpdate() method on line 233 the session is rolled back which 
does not work inside a trigger.

This sounds like a serious bug. Could you create a simple test case please?

Regards,
Thomas


--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to