[MDEV-28181] The innochecksum -w option was inadvertently removed in MDEV-25105 Created: 2022-03-28  Updated: 2022-03-28  Resolved: 2022-03-28

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.8.0, 10.6.0, 10.7.0, 10.9.0
Fix Version/s: 10.6.8, 10.7.4, 10.8.3, 10.9.1

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: regression-10.6

Issue Links:
Relates
relates to MDEV-27931 A page in innodb_checksum_algorithm=i... Closed

 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


Generated at Thu Feb 08 09:58:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.