Hi

I just started using H2 today and noted a severe bug in the 
java.sql.Connection.setAutoCommit(boolean) implementation.

The SUN/Oracle javadoc for JavaSE 1.5 clearly state *"NOTE: If this method 
is called during a transaction, the transaction is committed."*

However, by looking at the source of H2, one can see that its 
implementation of setAutoCommit() only sets the internal autocommit flag, 
no check whether a transaction is currently running and no commit is being 
done.

Obviously, software that relies on this fact is not going to work with H2 
(transactions won't be committed and locks will be kept forever, unless the 
connection is closed). In my case, I have ported a small PostgreSQL based 
app which stopped working after running on H2 (timeouts, since locks were 
not released).

Cheers,
 Freddi

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/WYIQMsqSpYYJ.
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