Bug #30821 setting --tc_heuristic_recover tries to set myisam_stats_method
Submitted: 5 Sep 2007 8:55 Modified: 24 Oct 2007 20:18
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S2 (Serious)
Version:5.0.50 OS:Any
Assigned to: Tatiana Azundris Nuernberg CPU Architecture:Any

[5 Sep 2007 8:55] Shane Bester
Description:
C:\mysql-enterprise-5.0.44-win32\bin>mysqld-nt --tc_heuristic_recover=commit --skip-grant-tables --console
Invalid value of myisam_stats_method: commit.

Seems the myisam_stats_method variable gets the value of tc_heuristic_recover value!

How to repeat:
 ./bin/mysqld_safe --skip-grant-tables --skip-name-resolve --tc_heuristic_recover=commit

or

C:\mysql-enterprise-5.0.44-win32\bin>mysqld-nt --tc_heuristic_recover=commit --skip-grant-tables --console

Suggested fix:
add the missing "break" to the case OPT_TC_HEURISTIC_RECOVER in get_one_option in mysqld.cc ??
[5 Sep 2007 8:55] MySQL Verification Team
.
[5 Sep 2007 9:46] MySQL Verification Team
also missing a break in block "case OPT_MERGE:"
[11 Oct 2007 16:31] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/35388

ChangeSet@1.2531, 2007-10-11 17:22:19+02:00, tnurnberg@sin.intern.azundris.com +4 -0
  Bug#30821: setting --tc_heuristic_recover tries to set myisam_stats_method
  
  Options to mysqld were not processed correctly because switch statement
  was missing some "break"s. CS adds them.
[11 Oct 2007 16:54] Ingo Strüwing
I vote for removing the test case and add "No test case. Requires special command line option. Manually tested." to the cangeset comment.

Please let us have a third opinion.

Otherwise ok to push from me.
[11 Oct 2007 17:01] MySQL Verification Team
yeah - if you're going to test this specific case, then each and every case should be tested. else, what's the point?
[11 Oct 2007 17:51] Ingo Strüwing
Then I think we have agreement. Please remove the test and add the comment.
[12 Oct 2007 9:23] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/35455

ChangeSet@1.2531, 2007-10-12 11:23:45+02:00, tnurnberg@sin.intern.azundris.com +1 -0
  Bug#30821: setting --tc_heuristic_recover tries to set myisam_stats_method
  
  Options to mysqld were not processed correctly because switch statement
  was missing some "break"s. CS adds them.
  
  No test case; would require .opt file and server restart. Manually tested.
[12 Oct 2007 9:41] Tatiana Azundris Nuernberg
pushed to  5.0.52 in maint.
[18 Oct 2007 21:35] Bugs System
Pushed into 5.1.23-beta
[18 Oct 2007 21:36] Bugs System
Pushed into 5.0.52
[24 Oct 2007 20:18] Paul DuBois
Noted in 5.0.52, 5.1.23 changelogs.

Values for the --tc-heuristic-recover option incorrectly were treated
as values for the --myisam-stats-method option.