Re: [h2] Commit or rollback is not allowed within a trigger but I'm not rolling back

2014-09-13 Thread Noel Grandin
Can you construct a standalone test case for this? Because I tried and my test case worked for me. On Saturday, 13 September 2014, Gili cow...@bbs.darktech.org wrote: Hi Noel, I don't think this issue is fixed yet. I just reproduced it in H2 1.4.181. Here is the stacktrace:

Re: [h2] Commit or rollback is not allowed within a trigger but I'm not rolling back

2014-09-13 Thread Gili
I'll try to put something together later on this week. It's possible I had a configuration problem because one part of my project was referencing 1.4 while another part was referencing version 1.3. I've since fixed this problem and rebuilt. We'll see if I run into this exception again. Gili

[h2] Primary key violation for AUTO_INCREMENT column

2014-09-13 Thread Gili
Hi, I'm running into constraint violations that I believe should be impossible using H2 1.4.181. My table definition is: CREATE TABLE user (id SMALLINT AUTO_INCREMENT(-32768, 1) PRIMARY KEY, owner_id SMALLINT, email VARCHAR(254) NOT NULL UNIQUE, password VARCHAR(82) NOT NULL, name

[h2] Different isolation levels for different connections

2014-09-13 Thread Gili
Hi, I just spent two days tracking down a race condition that ended up being caused by a H2 feature. It seems that when one thread invokes Connection.setTransactionIsolation() it affects all other connections. It turns out that invoking this method invokes SET LOCK_MODE under the hood and

[h2] Re: Primary key violation for AUTO_INCREMENT column

2014-09-13 Thread Gili
I caught the exception and dumped the database contents after such a conflict and, sure enough, H2 is trying to insert an existing primary key value. I didn't have these kind of problems before and I'm wondering what has been triggering all of this. I'm beginning to think this has something to