--tc-heuristic-recover option values off by one

Description

--tc-heuristic-recover option values are broken due to option parser enumerating them starting from 0 and the source code enumerating them starting from 1:

1 2 3 4 5 6 7 8 9 sql/mysqld.c: static const char *tc_heuristic_recover_names[]= { "COMMIT", "ROLLBACK", NullS }; sql/sql_class.h: #define TC_HEURISTIC_RECOVER_COMMIT 1 #define TC_HEURISTIC_RECOVER_ROLLBACK 2

Percona has fixed this by adding "NONE" as first option, MySQL 5.7 by adding "OFF"

Environment

None

Status

Assignee

Unassigned

Reporter

Hartmut Holzgraefe

Labels

External issue ID

None

External issue ID

None

Components

Fix versions

Affects versions

10.0
10.1
5.5

Priority

Major