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
=== modified file 'xtrabackup/innobackupex'
--- xtrabackup/innobackupex 2013-11-03 13:19:35 +0000
+++ xtrabackup/innobackupex 2013-11-05 11:55:35 +0000
@@ -3637,6 +3637,7 @@
3637 my $filename = shift;3637 my $filename = shift;
36383638
3639 my @option_names = (3639 my @option_names = (
3640 "innodb_checksum_algorithm",
3640 "innodb_data_file_path",3641 "innodb_data_file_path",
3641 "innodb_log_files_in_group",3642 "innodb_log_files_in_group",
3642 "innodb_log_file_size",3643 "innodb_log_file_size",
36433644
=== modified file 'xtrabackup/src/xtrabackup.cc'
--- xtrabackup/src/xtrabackup.cc 2013-08-26 06:59:09 +0000
+++ xtrabackup/src/xtrabackup.cc 2013-11-05 11:55:35 +0000
@@ -869,7 +869,7 @@
869 "The algorithm InnoDB uses for page checksumming. [CRC32, STRICT_CRC32, "869 "The algorithm InnoDB uses for page checksumming. [CRC32, STRICT_CRC32, "
870 "INNODB, STRICT_INNODB, NONE, STRICT_NONE]", &srv_checksum_algorithm,870 "INNODB, STRICT_INNODB, NONE, STRICT_NONE]", &srv_checksum_algorithm,
871 &srv_checksum_algorithm, &innodb_checksum_algorithm_typelib, GET_ENUM,871 &srv_checksum_algorithm, &innodb_checksum_algorithm_typelib, GET_ENUM,
872 REQUIRED_ARG, 0, 0, 0, 0, 0, 0},872 REQUIRED_ARG, SRV_CHECKSUM_ALGORITHM_INNODB, 0, 0, 0, 0, 0},
873 {"innodb_undo_directory", OPT_INNODB_UNDO_DIRECTORY,873 {"innodb_undo_directory", OPT_INNODB_UNDO_DIRECTORY,
874 "Directory where undo tablespace files live, this path can be absolute.",874 "Directory where undo tablespace files live, this path can be absolute.",
875 (G_PTR*) &srv_undo_dir, (G_PTR*) &srv_undo_dir,875 (G_PTR*) &srv_undo_dir, (G_PTR*) &srv_undo_dir,
@@ -5940,6 +5940,9 @@
5940 srv_undo_dir);5940 srv_undo_dir);
5941 }5941 }
5942 printf("innodb_undo_tablespaces = %lu\n", srv_undo_tablespaces);5942 printf("innodb_undo_tablespaces = %lu\n", srv_undo_tablespaces);
5943 printf("innodb_checksum_algorithm = %s\n",
5944 innodb_checksum_algorithm_names[srv_checksum_algorithm]
5945 );
5943#endif5946#endif
5944 printf("innodb_buffer_pool_filename = \"%s\"\n",5947 printf("innodb_buffer_pool_filename = \"%s\"\n",
5945 innobase_buffer_pool_filename ?5948 innobase_buffer_pool_filename ?
59465949
=== added file 'xtrabackup/test/t/bug1247586.sh'
--- xtrabackup/test/t/bug1247586.sh 1970-01-01 00:00:00 +0000
+++ xtrabackup/test/t/bug1247586.sh 2013-11-05 11:55:35 +0000
@@ -0,0 +1,12 @@
1##########################################################################
2# Bug #1247586: xtrabackup_56 defaults to innodb_checksum_algorithm=crc32
3##########################################################################
4
5require_server_version_higher_than 5.6.0
6
7if ! xtrabackup --help 2>&1 |
8 egrep '^innodb-checksum-algorithm[[:space:]]+innodb$'
9then
10 die "XtraBackup is using an incorrect default value for \
11--innodb-checksum-algorithm"
12fi
013
=== added file 'xtrabackup/test/t/bug1248065.sh'
--- xtrabackup/test/t/bug1248065.sh 1970-01-01 00:00:00 +0000
+++ xtrabackup/test/t/bug1248065.sh 2013-11-05 11:55:35 +0000
@@ -0,0 +1,49 @@
1############################################################################
2# Bug #1248065: innodb_checksum_algorithm should be stored in backup-my.cnf
3############################################################################
4
5require_server_version_higher_than 5.6.0
6
7function test_with_checksum_algo()
8{
9 vlog "**************************************"
10 vlog "Testing with innodb_checksum_algorithm=$1"
11 vlog "**************************************"
12
13 MYSQLD_EXTRA_MY_CNF_OPTS="
14innodb_checksum_algorithm=$1
15"
16
17 start_server
18 load_sakila
19
20 record_db_state sakila
21
22 innobackupex --no-timestamp $topdir/backup
23
24 egrep '^innodb_checksum_algorithm='$1'$' $topdir/backup/backup-my.cnf
25
26 stop_server
27 rm -rf $MYSQLD_DATADIR/*
28
29 innobackupex --apply-log --defaults-file=$topdir/backup/backup-my.cnf \
30 $topdir/backup
31
32 innobackupex --copy-back $topdir/backup
33
34 rm -rf $topdir/backup
35
36 start_server
37
38 verify_db_state sakila
39
40 stop_server
41
42 rm -rf $MYSQLD_VARDIR
43}
44
45# Test with strict_* values to force errors on algorithm mismatch
46
47test_with_checksum_algo strict_none
48test_with_checksum_algo strict_crc32
49test_with_checksum_algo strict_innodb

Subscribers

People subscribed via source and target branches

to all changes: