dbmaintain icon indicating copy to clipboard operation
dbmaintain copied to clipboard

No rollback (autocommit=true ??) when error occurs during a script execution

Open fcamblor opened this issue 7 years ago • 0 comments

Hi there !

When I'm facing some errors during a script execution, I'm surprised that my DB is left "as is" at the point where the script failed ... whereas I can see in the code that a rollback should be supposed to happen.

Do you think I have something wrong configured somewhere ? (I looked for autocommit property in dbmaintain-default.properties but didn't found such config)

Looking more precisely on the code, I can see that both endTransactionAndCommit() and endTransactionAndRollback() call a reenableAutoCommit() in the finally{ .. } statement, no matter if autocommit was enabled (or not) at the beginning of the transaction.

Wouldn't it be a bug ?

Kind regards

fcamblor avatar Jul 10 '18 14:07 fcamblor