Bug #95414 Ambiguous statement about autocommit
Submitted: 19 May 2019 4:40 Modified: 31 Jul 2019 11:49
Reporter: Rick James Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.5,5.6,5.7,8.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: autocommit, rollback

[19 May 2019 4:40] Rick James
Description:
https://dev.mysql.com/doc/refman/8.0/en/commit.html (and previous versions, perhaps back to 4.0)

says

By default, MySQL runs with autocommit mode enabled. This means that as soon as you execute a statement that updates (modifies) a table, MySQL stores the update on disk to make it permanent. The change cannot be rolled back.

* This fails qualify point out that it only applies when not inside a transaction, and
* The change, if not complete, _will_ be rolled back, contradicting the last sentence.

Further discussion, and pointing out that it is ambiguous:

https://stackoverflow.com/questions/55942939/mysql-autocommit-flag-is-on-but-transaction-s...

How to repeat:
N/A

Suggested fix:
Consider changing the paragraph to something like:

By default, MySQL runs with autocommit mode enabled.  This means that, when not otherwise inside a transaction, each statement is atomic, as if it were surrounded by BEGIN and COMMIT.  You cannot ROLLBACK the effect, however, if a crash occurs before the statement finishes, it will be rolled back.
[19 May 2019 20:02] MySQL Verification Team
Thank you for the bug report.
[31 Jul 2019 11:49] Paul DuBois
Posted by developer:
 
Thanks for the suggested revision. Amended as suggested, with minor revisions.