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

The innochecksum -w option was inadvertently removed in MDEV-25105

    XMLWordPrintable

    Details

      Description

      In MDEV-25105, the command line options of the innochecksum tool were simplified a little too much. The intended change was to remove the choice of a checksum algorithm. An unintended change was that the option --write (-w) was removed altogether.

      What should have been done is to make that option Boolean:

      diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc
      index 6c732dbdb48..65224c8c3f5 100644
      --- a/extra/innochecksum.cc
      +++ b/extra/innochecksum.cc
      @@ -1194,6 +1194,8 @@ static struct my_option innochecksum_options[] = {
         {"allow-mismatches", 'a', "Maximum checksum mismatch allowed.",
           &allow_mismatches, &allow_mismatches, 0,
           GET_ULL, REQUIRED_ARG, 0, 0, ULLONG_MAX, 0, 1, 0},
      +  {"write", 'w', "Rewrite the checksum.",
      +    &do_write, &do_write, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
         {"page-type-summary", 'S', "Display a count of each page type "
          "in a tablespace.", &page_type_summary, &page_type_summary, 0,
          GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
      

      In this way, it will be possible to convert old InnoDB files to innodb_checksum_algorithm=crc32 by executing the following:

      innochecksum -n -w ibdata* */*.ibd
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marko Marko Mäkelä
              Reporter:
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.