← Back to team overview

enterprise-support team mailing list archive

[Bug 1334330] [NEW] --tc-heuristic-recover option values are broken

 

Public bug reported:

Copy of http://bugs.mysql.com/bug.php?id=70860:

[8 Nov 2013 10:20] Laurynas Biveinis
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:

#define TC_HEURISTIC_RECOVER_COMMIT   1
#define TC_HEURISTIC_RECOVER_ROLLBACK 2

How to repeat:
Set up the server for 2 XA SEs as in bug 70854, then start the server under the debugger with --tc-heuristic-recover=ROLLBACK, set a breakpoint on ha_recover() (by the time of its call tc_heuristic_recover variable must be set up):

Breakpoint 2, ha_recover (commit_list=0x0) at /home/laurynas/percona/src/mysql-server/sql/handler.cc:1846
1846	  DBUG_ENTER("ha_recover");
(gdb) print tc_heuristic_recover
$1 = 1

that is it's, equal to TC_HEURISTIC_RECOVER_COMMIT instead.

Suggested fix:
Re-enumerating the #defines to start from 0 won't work, as zero value for tc_heuristic_recover should mean that the option was not specified at all.

I'd consider adding "NONE" as the 1st allowed option value and the
default.

** Affects: mysql-server
     Importance: Unknown
         Status: Unknown

** Affects: percona-server
     Importance: Medium
         Status: Triaged

** Affects: percona-server/5.1
     Importance: Undecided
         Status: Won't Fix

** Affects: percona-server/5.5
     Importance: Undecided
         Status: Won't Fix

** Affects: percona-server/5.6
     Importance: Medium
         Status: Triaged


** Tags: tokudb upstream

** Also affects: percona-server/5.6
   Importance: Undecided
       Status: New

** Also affects: percona-server/5.1
   Importance: Undecided
       Status: New

** Also affects: percona-server/5.5
   Importance: Undecided
       Status: New

** Tags added: tokudb upstream

** Changed in: percona-server/5.1
       Status: New => Won't Fix

** Changed in: percona-server/5.5
       Status: New => Won't Fix

** Changed in: percona-server/5.6
       Status: New => Triaged

** Changed in: percona-server/5.6
   Importance: Undecided => Medium

** Bug watch added: MySQL Bug System #70860
   http://bugs.mysql.com/bug.php?id=70860

** Also affects: mysql-server via
   http://bugs.mysql.com/bug.php?id=70860
   Importance: Unknown
       Status: Unknown

-- 
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to MySQL.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/1334330

Title:
  --tc-heuristic-recover option values are broken

To manage notifications about this bug go to:
https://bugs.launchpad.net/mysql-server/+bug/1334330/+subscriptions


Follow ups

References