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
=== modified file 'storage/innobase/xtrabackup/src/fil_cur.cc'
--- storage/innobase/xtrabackup/src/fil_cur.cc 2013-11-26 10:44:44 +0000
+++ storage/innobase/xtrabackup/src/fil_cur.cc 2014-02-28 06:03:56 +0000
@@ -293,7 +293,23 @@
293 if (to_read > (ib_int64_t) cursor->buf_size) {293 if (to_read > (ib_int64_t) cursor->buf_size) {
294 to_read = (ib_int64_t) cursor->buf_size;294 to_read = (ib_int64_t) cursor->buf_size;
295 }295 }
296
296 xb_a(to_read > 0 && to_read <= 0xFFFFFFFFLL);297 xb_a(to_read > 0 && to_read <= 0xFFFFFFFFLL);
298
299 if (to_read % cursor->page_size != 0 &&
300 offset + to_read == cursor->statinfo.st_size) {
301
302 msg("[%02u] xtrabackup: Warning: junk at the end of %s:\n",
303 cursor->thread_n, cursor->abs_path);
304 msg("[%02u] xtrabackup: Warning: offset = %llu, "
305 "to_read = %llu\n",
306 cursor->thread_n,
307 (unsigned long long) offset,
308 (unsigned long long) to_read);
309
310 return(XB_FIL_CUR_EOF);
311 }
312
297 xb_a(to_read % cursor->page_size == 0);313 xb_a(to_read % cursor->page_size == 0);
298314
299 npages = (ulint) (to_read >> cursor->page_size_shift);315 npages = (ulint) (to_read >> cursor->page_size_shift);
300316
=== added file 'storage/innobase/xtrabackup/test/t/bug1177201.sh'
--- storage/innobase/xtrabackup/test/t/bug1177201.sh 1970-01-01 00:00:00 +0000
+++ storage/innobase/xtrabackup/test/t/bug1177201.sh 2014-02-28 06:03:56 +0000
@@ -0,0 +1,22 @@
1########################################################################
2# Bug #1177201: Assertion "to_read % cursor->page_size == 0" failed at
3# fil_cur.cc:218
4########################################################################
5
6start_server
7
8dd if=/dev/zero of=$topdir/zeroes bs=1 count=4096
9
10cat $topdir/zeroes >>$MYSQLD_DATADIR/ibdata1
11
12innobackupex --no-timestamp $topdir/backup
13
14stop_server
15
16rm -rf $MYSQLD_DATADIR/*
17
18innobackupex --apply-log $topdir/backup
19
20innobackupex --copy-back $topdir/backup
21
22start_server

Subscribers

People subscribed via source and target branches

to all changes: