Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-1514

LP #1334330: --tc-heuristic-recover option values are broken

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None

      Description

      **Reported in Launchpad by Laurynas Biveinis last update 29-07-2014 13:01:44

      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.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            lpjirasync lpjirasync (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Smart Checklist