Merge lp:~laurynas-biveinis/percona-xtrabackup/BT-28340-1164979-2.0 into lp:percona-xtrabackup/2.0

Proposed by Laurynas Biveinis on 2013-04-10
Status: Merged
Approved by: Alexey Kopytov on 2013-04-15
Approved revision: 529
Merged at revision: 530
Proposed branch: lp:~laurynas-biveinis/percona-xtrabackup/BT-28340-1164979-2.0
Merge into: lp:percona-xtrabackup/2.0
Diff against target: 25 lines (+8/-0)
1 file modified
src/xtrabackup.cc (+8/-0)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-xtrabackup/BT-28340-1164979-2.0
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) 2013-04-10 Approve on 2013-04-15
Review via email: mp+157999@code.launchpad.net

Description of the change

BT 28340

http://jenkins.percona.com/job/percona-xtrabackup-2.0-param/386/

Fix bug 1164979 (xtrabackup_56 can fail on prepare if log files > 4G
used on source server).

The issue is that log checkpoint offset field has been extended to 64
bits to support log files > 4G, yet XtraBackup would overwrite only
the lower 32 bits. If the higher 32 bits happened to be non-zero,
incorrect log offsets would be used for InnoDB recovery.

Fixed by overwriting the higher 32 bits with zero on MySQL 5.6.

To post a comment you must log in.
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/xtrabackup.cc'
2--- src/xtrabackup.cc 2013-04-03 22:53:49 +0000
3+++ src/xtrabackup.cc 2013-04-10 06:55:29 +0000
4@@ -6349,6 +6349,10 @@
5 + LOG_CHECKPOINT_OFFSET_LOW32,
6 LOG_FILE_HDR_SIZE + (ulint) ut_dulint_minus(max_lsn,
7 ut_dulint_align_down(max_lsn,OS_FILE_LOG_BLOCK_SIZE)));
8+#if MYSQL_VERSION_ID >= 50600
9+ mach_write_to_4(log_buf + LOG_CHECKPOINT_1
10+ + LOG_CHECKPOINT_OFFSET_HIGH32, 0);
11+#endif
12 #ifdef XTRADB_BASED
13 MACH_WRITE_64(log_buf + LOG_CHECKPOINT_1 + LOG_CHECKPOINT_ARCHIVED_LSN,
14 (ib_uint64_t)(LOG_FILE_HDR_SIZE + ut_dulint_minus(max_lsn,
15@@ -6366,6 +6370,10 @@
16 + LOG_CHECKPOINT_OFFSET_LOW32,
17 LOG_FILE_HDR_SIZE + (ulint) ut_dulint_minus(max_lsn,
18 ut_dulint_align_down(max_lsn,OS_FILE_LOG_BLOCK_SIZE)));
19+#if MYSQL_VERSION_ID >= 50600
20+ mach_write_to_4(log_buf + LOG_CHECKPOINT_2
21+ + LOG_CHECKPOINT_OFFSET_HIGH32, 0);
22+#endif
23 #ifdef XTRADB_BASED
24 MACH_WRITE_64(log_buf + LOG_CHECKPOINT_2 + LOG_CHECKPOINT_ARCHIVED_LSN,
25 (ib_uint64_t)(LOG_FILE_HDR_SIZE + ut_dulint_minus(max_lsn,

Subscribers

People subscribed via source and target branches