Hello Ian,

I couldn't reproduce your original observation (the returned ID being
NULL) with either INSERT .. SET or INSERT .. VALUES syntax, neither
with autocommit set to true or false. Was this a side-effect of
another problem that you have fixed in the mean time?

I'm not sure about the default value for "autocommit". I know that the
official JDBC tutorial claims it's "true", which is not what I have
observed in most dialects:
http://docs.oracle.com/javase/tutorial/jdbc/basics/transactions.html

Having this set to "true" is an undesireable default value, in my
opinion - except for very small and simple applications. Most
applications have some need for transactions, even if it is only to
correctly isolate an INSERT followed by a SELECT, such as in jOOQ's
implementation of INSERT .. RETURNING for MySQL.

Cheers
Lukas

Reply via email to