Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
setSavepoint() / setSavepoint(String) send SAVEPOINT without checking auto-commit. In auto-commit the statement succeeds, but SAVEPOINT starts no transaction, so the next statement's implicit commit discards it. The application thinks it holds a rollback point, the data is committed anyway, and the failure only surfaces later at the rollback.
The java.sql.Connection javadoc documents clearly state to throw an SQLException when the connection "is currently in auto-commit mode".