It's a bug, and I'm sure we'll get round to fixing it, but its also
dodgy behaviour on the part of an application to be relying on that
behaviour.
setAutoCommit() is meant to be called once after a connection is
established, and then never again.
On 2012-03-01 23:59, Freddi Hinz wrote:
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.
--
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.