Merge lp:~akopytov/percona-xtrabackup/innodb_checksum_algorithm-2.2 into lp:percona-xtrabackup/2.2

Proposed by Alexey Kopytov
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 4887
Proposed branch: lp:~akopytov/percona-xtrabackup/innodb_checksum_algorithm-2.2
Merge into: lp:percona-xtrabackup/2.2
Diff against target: 105 lines (+66/-1)
4 files modified
xtrabackup/innobackupex (+1/-0)
xtrabackup/src/xtrabackup.cc (+4/-1)
xtrabackup/test/t/bug1247586.sh (+12/-0)
xtrabackup/test/t/bug1248065.sh (+49/-0)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/innodb_checksum_algorithm-2.2
Reviewer Review Type Date Requested Status
George Ormond Lorch III (community) g2 Approve
Review via email: mp+193912@code.launchpad.net

Description of the change

Bug #1247586: xtrabackup_56 defaults to innodb_checksum_algorithm=crc32

Fixed by changing the default value from 0 to
SRV_CHECKSUM_ALGORITHM_INNODB.

Bug #1248065: innodb_checksum_algorithm should be stored in
backup-my.cnf

Modified both innobackupex and the xtrabackup binary so that
innodb_checksum_algorithm is stored in backup-my.cnf

http://jenkins.percona.com/view/XtraBackup/job/percona-xtrabackup-2.2-param/29/

To post a comment you must log in.
Revision history for this message
George Ormond Lorch III (gl-az) :
review: Approve (g2)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'xtrabackup/innobackupex'
2--- xtrabackup/innobackupex 2013-11-03 13:19:35 +0000
3+++ xtrabackup/innobackupex 2013-11-05 11:55:35 +0000
4@@ -3637,6 +3637,7 @@
5 my $filename = shift;
6
7 my @option_names = (
8+ "innodb_checksum_algorithm",
9 "innodb_data_file_path",
10 "innodb_log_files_in_group",
11 "innodb_log_file_size",
12
13=== modified file 'xtrabackup/src/xtrabackup.cc'
14--- xtrabackup/src/xtrabackup.cc 2013-08-26 06:59:09 +0000
15+++ xtrabackup/src/xtrabackup.cc 2013-11-05 11:55:35 +0000
16@@ -869,7 +869,7 @@
17 "The algorithm InnoDB uses for page checksumming. [CRC32, STRICT_CRC32, "
18 "INNODB, STRICT_INNODB, NONE, STRICT_NONE]", &srv_checksum_algorithm,
19 &srv_checksum_algorithm, &innodb_checksum_algorithm_typelib, GET_ENUM,
20- REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
21+ REQUIRED_ARG, SRV_CHECKSUM_ALGORITHM_INNODB, 0, 0, 0, 0, 0},
22 {"innodb_undo_directory", OPT_INNODB_UNDO_DIRECTORY,
23 "Directory where undo tablespace files live, this path can be absolute.",
24 (G_PTR*) &srv_undo_dir, (G_PTR*) &srv_undo_dir,
25@@ -5940,6 +5940,9 @@
26 srv_undo_dir);
27 }
28 printf("innodb_undo_tablespaces = %lu\n", srv_undo_tablespaces);
29+ printf("innodb_checksum_algorithm = %s\n",
30+ innodb_checksum_algorithm_names[srv_checksum_algorithm]
31+ );
32 #endif
33 printf("innodb_buffer_pool_filename = \"%s\"\n",
34 innobase_buffer_pool_filename ?
35
36=== added file 'xtrabackup/test/t/bug1247586.sh'
37--- xtrabackup/test/t/bug1247586.sh 1970-01-01 00:00:00 +0000
38+++ xtrabackup/test/t/bug1247586.sh 2013-11-05 11:55:35 +0000
39@@ -0,0 +1,12 @@
40+##########################################################################
41+# Bug #1247586: xtrabackup_56 defaults to innodb_checksum_algorithm=crc32
42+##########################################################################
43+
44+require_server_version_higher_than 5.6.0
45+
46+if ! xtrabackup --help 2>&1 |
47+ egrep '^innodb-checksum-algorithm[[:space:]]+innodb$'
48+then
49+ die "XtraBackup is using an incorrect default value for \
50+--innodb-checksum-algorithm"
51+fi
52
53=== added file 'xtrabackup/test/t/bug1248065.sh'
54--- xtrabackup/test/t/bug1248065.sh 1970-01-01 00:00:00 +0000
55+++ xtrabackup/test/t/bug1248065.sh 2013-11-05 11:55:35 +0000
56@@ -0,0 +1,49 @@
57+############################################################################
58+# Bug #1248065: innodb_checksum_algorithm should be stored in backup-my.cnf
59+############################################################################
60+
61+require_server_version_higher_than 5.6.0
62+
63+function test_with_checksum_algo()
64+{
65+ vlog "**************************************"
66+ vlog "Testing with innodb_checksum_algorithm=$1"
67+ vlog "**************************************"
68+
69+ MYSQLD_EXTRA_MY_CNF_OPTS="
70+innodb_checksum_algorithm=$1
71+"
72+
73+ start_server
74+ load_sakila
75+
76+ record_db_state sakila
77+
78+ innobackupex --no-timestamp $topdir/backup
79+
80+ egrep '^innodb_checksum_algorithm='$1'$' $topdir/backup/backup-my.cnf
81+
82+ stop_server
83+ rm -rf $MYSQLD_DATADIR/*
84+
85+ innobackupex --apply-log --defaults-file=$topdir/backup/backup-my.cnf \
86+ $topdir/backup
87+
88+ innobackupex --copy-back $topdir/backup
89+
90+ rm -rf $topdir/backup
91+
92+ start_server
93+
94+ verify_db_state sakila
95+
96+ stop_server
97+
98+ rm -rf $MYSQLD_VARDIR
99+}
100+
101+# Test with strict_* values to force errors on algorithm mismatch
102+
103+test_with_checksum_algo strict_none
104+test_with_checksum_algo strict_crc32
105+test_with_checksum_algo strict_innodb

Subscribers

People subscribed via source and target branches

to all changes: