Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-9493

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

Details

    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:

      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"

      Attachments

        Activity

          hholzgra Hartmut Holzgraefe added a comment - https://bugs.mysql.com/bug.php?id=70860 https://bugs.launchpad.net/percona-server/+bug/1334330

          Fixed in 5.7

          elenst Elena Stepanova added a comment - Fixed in 5.7

          The test case from the upstream bug report does not quite work for us, but all the same, the values are mixed up – when it's started with ROLLBACK, it attempts to commit, and vice versa. Also, when it tries to commit, we are getting an assertion failure, but that's a different story.

          elenst Elena Stepanova added a comment - The test case from the upstream bug report does not quite work for us, but all the same, the values are mixed up – when it's started with ROLLBACK , it attempts to commit, and vice versa. Also, when it tries to commit, we are getting an assertion failure, but that's a different story.

          People

            serg Sergei Golubchik
            hholzgra Hartmut Holzgraefe
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.