I have two entity managers (and this has to stay as it is). I am using in-memory database for unit tests. When I run the tests, I find the following issues.

As in this simple case:

```
  emFirst.createNativeQuery("select * from schema1.table").getResultList();

  emSecond.createNativeQuery("create table schema2.table (id int)").executeUpdate();

```

It gets stuck in a deadlock after upgrading HSQL from 2.3.2 to 2.3.4

In order to to make it work again i have to wrap each statement in transaction.

Do you know how can I make it work without using below?

```
    getTransaction().begin();
    emFirst.createNativeQuery("select * from schema1.table").getResultList();
    getTransaction().commit();

    getTransaction().begin();         
    emSecond.createNativeQuery("create table schema2.table (id int)").executeUpdate();
    getTransaction().commit();

```

I am using Hibernate 4.3.6

Here is a heap dump from deadlock:

```
> "main" #1 prio=5 os_prio=0 tid=0x00007f7be0015000 nid=0x3b29 waiting
> on condition [0x00007f7be8584000]    java.lang.Thread.State: WAITING
> (parking)     at sun.misc.Unsafe.park(Native Method)
>   - parking to wait for  <0x000000073635b3d0> (a org.hsqldb.lib.CountUpDownLatch$Sync)    at
> java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)     at
> java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
>   at
> java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
>   at
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
>   at org.hsqldb.lib.CountUpDownLatch.await(Unknown Source)    at
> org.hsqldb.Session.executeCompiledStatement(Unknown Source)   at
> org.hsqldb.Session.execute(Unknown Source)
>   - locked <0x000000073635b298> (a org.hsqldb.Session)    at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(Unknown Source)    at
> org.hsqldb.jdbc.JDBCPreparedStatement.executeUpdate(Unknown Source)
>   - locked <0x00000007363a92f8> (a org.hsqldb.jdbc.JDBCPreparedStatement)     at
> com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:147)
>   at
> org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)
>   at
> org.hibernate.engine.query.spi.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:211)
>   at
> org.hibernate.internal.SessionImpl.executeNativeUpdate(SessionImpl.java:1310)
>   at
> org.hibernate.internal.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:389)

```