Merge lp:~akopytov/percona-xtrabackup/bug891496-1.6 into lp:percona-xtrabackup/1.6

Proposed by Alexey Kopytov
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 323
Proposed branch: lp:~akopytov/percona-xtrabackup/bug891496-1.6
Merge into: lp:percona-xtrabackup/1.6
Diff against target: 75 lines (+50/-3)
2 files modified
patches/tar4ibd_libtar-1.2.11.patch (+3/-3)
test/t/bug891496.sh (+47/-0)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/bug891496-1.6
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Review via email: mp+88673@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :
Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'patches/tar4ibd_libtar-1.2.11.patch'
2--- patches/tar4ibd_libtar-1.2.11.patch 2011-09-20 01:47:28 +0000
3+++ patches/tar4ibd_libtar-1.2.11.patch 2012-01-16 12:29:26 +0000
4@@ -416,7 +416,9 @@
5 + fcntl(filefd, F_SETFL, O_DIRECT);
6 +#endif
7 +
8-+ zip_size = fil_fd_get_zip_size(filefd);
9++ is_sys_space = (fil_fd_get_space_id(filefd) == 0);
10++
11++ zip_size = is_sys_space ? 0 : fil_fd_get_zip_size(filefd);
12 + if (zip_size == -1) {
13 + fprintf(stderr,
14 + "tar4ibd: file '%s' has invalid zip_size value.\n",
15@@ -426,8 +428,6 @@
16 + page_size = zip_size;
17 + }
18 +
19-+ is_sys_space = (fil_fd_get_space_id(filefd) == 0);
20-+
21 + n_retry = 0;
22 size = th_get_size(t);
23 - for (i = size; i > T_BLOCKSIZE; i -= T_BLOCKSIZE)
24
25=== added file 'test/t/bug891496.sh'
26--- test/t/bug891496.sh 1970-01-01 00:00:00 +0000
27+++ test/t/bug891496.sh 2012-01-16 12:29:26 +0000
28@@ -0,0 +1,47 @@
29+##########################################################################
30+# Bug #891496: tar4ibd fails on datafiles generated on 5.0 #
31+##########################################################################
32+
33+. inc/common.sh
34+
35+init
36+
37+innodb_data_file_path="ibdata1:3M;ibdata2:10M:autoextend"
38+
39+cat >> $topdir/my.cnf <<EOF
40+innodb_data_file_path=$innodb_data_file_path
41+EOF
42+
43+MYSQLD_ARGS="$MYSQLD_ARGS --innodb_data_file_path=$innodb_data_file_path"
44+
45+run_mysqld
46+load_dbase_schema sakila
47+load_dbase_data sakila
48+
49+# Take backup
50+mkdir -p $topdir/backup
51+innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar
52+
53+stop_mysqld
54+# Remove datadir
55+rm -r $mysql_datadir
56+# Restore sakila
57+vlog "Applying log"
58+backup_dir=$topdir/backup
59+cd $backup_dir
60+$TAR -ixvf out.tar
61+cd - >/dev/null 2>&1
62+vlog "###########"
63+vlog "# PREPARE #"
64+vlog "###########"
65+innobackupex --apply-log $backup_dir
66+vlog "Restoring MySQL datadir"
67+mkdir -p $mysql_datadir
68+vlog "###########"
69+vlog "# RESTORE #"
70+vlog "###########"
71+innobackupex --copy-back $backup_dir
72+
73+run_mysqld
74+# Check sakila
75+run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila

Subscribers

People subscribed via source and target branches