By default, MySQL starts the session for each new connection with
autocommit mode enabled, so MySQL does a commit after each SQL
statement if that statement did not return an error. If a
statement returns an error, the commit or rollback behavior
depends on the error. See Section 220.127.116.11, “
InnoDB Error Handling”.
If a session that has autocommit disabled ends without explicitly committing the final transaction, MySQL rolls back that transaction.
Some statements implicitly end a transaction, as if you had done a
COMMIT before executing the
statement. For details, see Section 13.3.3, “Statements That Cause an Implicit Commit”.
Copyright © 1997, 2014, Oracle and/or its affiliates. All rights reserved. Legal Notices