Merge lp:~akopytov/percona-xtrabackup/bug1177201-2.1 into lp:percona-xtrabackup/2.2

Proposed by Alexey Kopytov
Status: Superseded
Proposed branch: lp:~akopytov/percona-xtrabackup/bug1177201-2.1
Merge into: lp:percona-xtrabackup/2.2
Diff against target: 54 lines (+38/-0)
2 files modified
storage/innobase/xtrabackup/src/fil_cur.cc (+16/-0)
storage/innobase/xtrabackup/test/t/bug1177201.sh (+22/-0)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/bug1177201-2.1
Reviewer Review Type Date Requested Status
Sergei Glushchenko (community) g2 Needs Resubmitting
Review via email: mp+208733@code.launchpad.net

This proposal has been superseded by a proposal from 2014-02-28.

Description of the change

    Bug #1177201: Assertion "to_read % cursor->page_size == 0" failed at
                  fil_cur.cc:218

    Allow junk at the end of data files, i.e. when there’s a block less than
    the page size at the end of the file. It is apparently a server-side
    problem with unknown root cause, but it’s ok to ignore that as long as
    InnoDB itself ignores such datafiles.

http://jenkins.percona.com/view/PXB%202.1/job/percona-xtrabackup-2.1-param/553/

To post a comment you must log in.
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Hi Alexey,

Looks good, but please resubmit to lp:percona-xtrabackup/2.1

review: Needs Resubmitting (g2)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'storage/innobase/xtrabackup/src/fil_cur.cc'
2--- storage/innobase/xtrabackup/src/fil_cur.cc 2013-11-26 10:44:44 +0000
3+++ storage/innobase/xtrabackup/src/fil_cur.cc 2014-02-28 06:03:56 +0000
4@@ -293,7 +293,23 @@
5 if (to_read > (ib_int64_t) cursor->buf_size) {
6 to_read = (ib_int64_t) cursor->buf_size;
7 }
8+
9 xb_a(to_read > 0 && to_read <= 0xFFFFFFFFLL);
10+
11+ if (to_read % cursor->page_size != 0 &&
12+ offset + to_read == cursor->statinfo.st_size) {
13+
14+ msg("[%02u] xtrabackup: Warning: junk at the end of %s:\n",
15+ cursor->thread_n, cursor->abs_path);
16+ msg("[%02u] xtrabackup: Warning: offset = %llu, "
17+ "to_read = %llu\n",
18+ cursor->thread_n,
19+ (unsigned long long) offset,
20+ (unsigned long long) to_read);
21+
22+ return(XB_FIL_CUR_EOF);
23+ }
24+
25 xb_a(to_read % cursor->page_size == 0);
26
27 npages = (ulint) (to_read >> cursor->page_size_shift);
28
29=== added file 'storage/innobase/xtrabackup/test/t/bug1177201.sh'
30--- storage/innobase/xtrabackup/test/t/bug1177201.sh 1970-01-01 00:00:00 +0000
31+++ storage/innobase/xtrabackup/test/t/bug1177201.sh 2014-02-28 06:03:56 +0000
32@@ -0,0 +1,22 @@
33+########################################################################
34+# Bug #1177201: Assertion "to_read % cursor->page_size == 0" failed at
35+# fil_cur.cc:218
36+########################################################################
37+
38+start_server
39+
40+dd if=/dev/zero of=$topdir/zeroes bs=1 count=4096
41+
42+cat $topdir/zeroes >>$MYSQLD_DATADIR/ibdata1
43+
44+innobackupex --no-timestamp $topdir/backup
45+
46+stop_server
47+
48+rm -rf $MYSQLD_DATADIR/*
49+
50+innobackupex --apply-log $topdir/backup
51+
52+innobackupex --copy-back $topdir/backup
53+
54+start_server

Subscribers

People subscribed via source and target branches

to all changes: