Bug #99591 Option --tc-heuristic-recover documentation wrong, missing details
Submitted: 15 May 2020 15:16 Modified: 15 Jun 2020 17:34
Reporter: Sami Ahlroos Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.7, 8.0 OS:Any
Assigned to: CPU Architecture:Any

[15 May 2020 15:16] Sami Ahlroos
Description:
Documentation for --tc-heuristic-recover states "To use this option, two or more storage engines that support XA transactions must be installed."

In fact it is the other way around: if two or more storage engines that support XA transactions are enabled, using --tc-heuristic-recover fails with error:
2020-05-13T15:35:00.422912Z 0 [Note] Heuristic crash recovery mode
2020-05-13T15:35:00.422923Z 0 [ERROR] --tc-heuristic-recover rollback strategy is not safe on systems with more than one 2-phase-commit-capable storage engine. Aborting crash recovery.
2020-05-13T15:35:00.422926Z 0 [ERROR] Heuristic crash recovery failed
2020-05-13T15:35:00.422927Z 0 [Note] Please restart mysqld without --tc-heuristic-recover
2020-05-13T15:35:00.438675Z 0 [ERROR] Can't init tc log
2020-05-13T15:35:00.438694Z 0 [ERROR] Aborting

Additionally, when that option is specified mysqld exits when the recovery is done. The documentation probably should mention this.

How to repeat:
See
https://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_tc-heuristic-rec...
and
https://dev.mysql.com/doc/refman/8.0/en/server-options.html#option_mysqld_tc-heuristic-rec...

And run mysqld --tc-heuristic-recover on server with more than one storage engine supporting XA. 

Suggested fix:
Update documentation to match reality.
[15 May 2020 23:28] Sveta Smirnova
This is the commit which introduced disabling tc-heuristic-recover for the case when two engines, supported two-phase commit, are installed: https://github.com/mysql/mysql-server/commit/23d30cc23d930d300601a8edc5c475d198e12195
[19 May 2020 12:15] MySQL Verification Team
Hi Ahlroos, Sveta,

Thank you for your documentation bug report.

I have checked your report and you are quite right.

Verified as reported.
[15 Jun 2020 17:34] Daniel Price
The variable description has been revised. The changes should appear online
soon.

Thank you for the bug report.
[16 Jun 2020 12:12] MySQL Verification Team
Thank you, Daniel.