Merge lp:~gaul/percona-data-recovery-tool-for-innodb/do-not-write-lsn into lp:percona-data-recovery-tool-for-innodb

Proposed by Andrew Gaul
Status: Merged
Merged at revision: 58
Proposed branch: lp:~gaul/percona-data-recovery-tool-for-innodb/do-not-write-lsn
Merge into: lp:percona-data-recovery-tool-for-innodb
Diff against target: 20 lines (+1/-2)
1 file modified
innochecksum.c (+1/-2)
To merge this branch: bzr merge lp:~gaul/percona-data-recovery-tool-for-innodb/do-not-write-lsn
Reviewer Review Type Date Requested Status
Aleksandr Kuzminsky (community) Approve
Review via email: mp+117540@code.launchpad.net
To post a comment you must log in.
51. By Aleksandr Kuzminsky

Address noisy compiler warnings

52. By Aleksandr Kuzminsky

Fixed Bug #929407

53. By Aleksandr Kuzminsky

Fixed Bug #1007450

54. By Andrew Gaul <email address hidden>

Do not modify LSN while updating old checksum

Revision history for this message
Aleksandr Kuzminsky (akuzminsky) :
review: Approve

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 2010-09-21 07:54:13 +0000
3+++ innochecksum.c 2012-08-06 21:03:18 +0000
4@@ -213,7 +213,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 = %lu; recorded = %lu\n", ct, oldcsum, oldcsumfield);
8- if (oldcsumfield != mach_read_from_4(p + FIL_PAGE_LSN) && oldcsumfield != oldcsum)
9+ if (oldcsumfield != oldcsum)
10 {
11 fprintf(stderr, "page %lu invalid (fails old style checksum)\n", ct);
12 fprintf(stderr, "page %lu: old style: calculated = 0x%X; recorded = 0x%X\n", ct, oldcsum, oldcsumfield);
13@@ -221,7 +221,6 @@
14 fprintf(stderr, "fixing old checksum of page %lu\n", ct);
15 // rewite recorded checksum with calculated one
16 fixed_chksum = mach_read_from_4((uchar*)&oldcsum);
17- memcpy(p + FIL_PAGE_LSN, &fixed_chksum, sizeof(fixed_chksum));
18 memcpy(p + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM, &fixed_chksum, sizeof(fixed_chksum));
19 // move to the beginning of the page
20 if(0 != fsetpos(f, &pos)){

Subscribers

People subscribed via source and target branches