Merge lp:~gaul/percona-data-recovery-tool-for-innodb/zero-checksum into lp:percona-data-recovery-tool-for-innodb

Proposed by Andrew Gaul
Status: Needs review
Proposed branch: lp:~gaul/percona-data-recovery-tool-for-innodb/zero-checksum
Merge into: lp:percona-data-recovery-tool-for-innodb
Diff against target: 12 lines (+1/-1)
1 file modified
innochecksum.c (+1/-1)
To merge this branch: bzr merge lp:~gaul/percona-data-recovery-tool-for-innodb/zero-checksum
Reviewer Review Type Date Requested Status
Percona developers Pending
Review via email: mp+119392@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

69. By Andrew Gaul <email address hidden>

Check old-style checksum only if it is non-zero

Allocated but unused pages have zero checksums. Note that this check
already exists for new-style checksums. This commit prevents spurious
errors in both verify and check modes.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'innochecksum.c'
2--- innochecksum.c 2012-08-13 11:41:46 +0000
3+++ innochecksum.c 2012-08-13 17:30:25 +0000
4@@ -230,7 +230,7 @@
5 oldcsumfield= mach_read_from_4(p + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM);
6 if (debug)
7 printf("page %lu: old style: calculated = 0x%08X; recorded = 0x%08X\n", ct, oldcsum, oldcsumfield);
8- if (oldcsumfield != oldcsum)
9+ if (oldcsumfield != 0 && oldcsumfield != oldcsum)
10 {
11 fprintf(stderr, "page %lu invalid (fails old style checksum)\n", ct);
12 fprintf(stderr, "page %lu: old style: calculated = 0x%08X; recorded = 0x%08X\n", ct, oldcsum, oldcsumfield);

Subscribers

People subscribed via source and target branches