The easiest workaround for now, is for you not to use PreparedStatements.
The problem is that the original Connection you are caching in the
init() method is linked to the system session, while the new Connection
is linked to the current user session.
That means that because you have generated PreparedStatements, your
trigger code is operating on a different session to the current user
transaction, which leads to a deadlock.
You're not doing anything wrong, but I can't see any way of fixing this
short of forbidding the use of PreparedStatement in Trigger, which is
unfortunate.
On 2013-05-24 15:16, Gili wrote:
Hi Noel,
Here is a self-contained testcase:
https://bitbucket.org/cowwoc/h2triggerdeadlock/downloads. You should
be getting the following output:
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.