Bug #53342 Documentation for completion_type variable is incomplete /XA and implicit commit
Submitted: 1 May 2010 11:02 Modified: 4 May 2010 19:30
Reporter: Konstantin Osipov (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.0+ OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[1 May 2010 11:02] Konstantin Osipov
Description:
Documentation for completion_type session variable does not cover cases of implicit commit issued by DDL, XA COMMIT, XA ROLLBACK and autocommit=1, where this variable has no effect.

This needs to be explicitly stated in the manual.

The variable only has effect on explicit BEGIN and COMMIT SQL words.

How to repeat:
Quoting the current manual, http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_completion_type :

 The transaction completion type. This variable can take the values shown in the following table.
Value 	Description
0 	COMMIT and ROLLBACK are unaffected. This is the default value.
1 	COMMIT and ROLLBACK are equivalent to COMMIT AND CHAIN and ROLLBACK AND CHAIN, respectively. (A new transaction starts immediately with the same isolation level as the just-terminated transaction.)
2 	COMMIT and ROLLBACK are equivalent to COMMIT RELEASE and ROLLBACK RELEASE, respectively. (The server disconnects after terminating the transaction.)

Suggested fix:
State explicitly which statements are unaffected.
[4 May 2010 19:30] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

Added to manual:

completion_type affects transactions that begin with START TRANSACTION
or BEGIN and end with COMMIT or ROLLBACK. It does not apply to
implicit commits resulting from execution of the statements listed
in [implicit-commit section]. It also does not apply for XA COMMIT, XA
ROLLBACK, or when autocommit=1.