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

Proposed by Alexey Kopytov
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 588
Proposed branch: lp:~akopytov/percona-xtrabackup/innodb_checksum_algorithm-2.0
Merge into: lp:percona-xtrabackup/2.0
Diff against target: 113 lines (+74/-1)
4 files modified
innobackupex (+1/-0)
src/xtrabackup.cc (+4/-1)
test/t/bug1247586.sh (+16/-0)
test/t/bug1248065.sh (+53/-0)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/innodb_checksum_algorithm-2.0
Reviewer Review Type Date Requested Status
George Ormond Lorch III (community) g2 Approve
Review via email: mp+193910@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.0-param/508/

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 'innobackupex'
--- innobackupex 2013-08-30 08:52:03 +0000
+++ innobackupex 2013-11-05 11:54:45 +0000
@@ -1935,6 +1935,7 @@
1935 }1935 }
19361936
1937 my @option_names = (1937 my @option_names = (
1938 "innodb_checksum_algorithm",
1938 "innodb_data_file_path",1939 "innodb_data_file_path",
1939 "innodb_log_files_in_group",1940 "innodb_log_files_in_group",
1940 "innodb_log_file_size",1941 "innodb_log_file_size",
19411942
=== modified file 'src/xtrabackup.cc'
--- src/xtrabackup.cc 2013-08-18 06:53:11 +0000
+++ src/xtrabackup.cc 2013-11-05 11:54:45 +0000
@@ -2042,7 +2042,7 @@
2042 "The algorithm InnoDB uses for page checksumming. [CRC32, STRICT_CRC32, "2042 "The algorithm InnoDB uses for page checksumming. [CRC32, STRICT_CRC32, "
2043 "INNODB, STRICT_INNODB, NONE, STRICT_NONE]", &srv_checksum_algorithm,2043 "INNODB, STRICT_INNODB, NONE, STRICT_NONE]", &srv_checksum_algorithm,
2044 &srv_checksum_algorithm, &innodb_checksum_algorithm_typelib, GET_ENUM,2044 &srv_checksum_algorithm, &innodb_checksum_algorithm_typelib, GET_ENUM,
2045 REQUIRED_ARG, 0, 0, 0, 0, 0, 0},2045 REQUIRED_ARG, SRV_CHECKSUM_ALGORITHM_INNODB, 0, 0, 0, 0, 0},
2046 {"innodb_undo_directory", OPT_INNODB_UNDO_DIRECTORY,2046 {"innodb_undo_directory", OPT_INNODB_UNDO_DIRECTORY,
2047 "Directory where undo tablespace files live, this path can be absolute.",2047 "Directory where undo tablespace files live, this path can be absolute.",
2048 (G_PTR*) &srv_undo_dir, (G_PTR*) &srv_undo_dir,2048 (G_PTR*) &srv_undo_dir, (G_PTR*) &srv_undo_dir,
@@ -8600,6 +8600,9 @@
8600 srv_undo_dir);8600 srv_undo_dir);
8601 }8601 }
8602 printf("innodb_undo_tablespaces = %lu\n", srv_undo_tablespaces);8602 printf("innodb_undo_tablespaces = %lu\n", srv_undo_tablespaces);
8603 printf("innodb_checksum_algorithm = %s\n",
8604 innodb_checksum_algorithm_names[srv_checksum_algorithm]
8605 );
8603#endif8606#endif
8604 printf("innodb_buffer_pool_filename = \"%s\"\n",8607 printf("innodb_buffer_pool_filename = \"%s\"\n",
8605 innobase_buffer_pool_filename ?8608 innobase_buffer_pool_filename ?
86068609
=== added file 'test/t/bug1247586.sh'
--- test/t/bug1247586.sh 1970-01-01 00:00:00 +0000
+++ test/t/bug1247586.sh 2013-11-05 11:54:45 +0000
@@ -0,0 +1,16 @@
1##########################################################################
2# Bug #1247586: xtrabackup_56 defaults to innodb_checksum_algorithm=crc32
3##########################################################################
4
5if [ ${MYSQL_VERSION:0:3} != "5.6" ]
6then
7 echo "Requires a 5.6 server" > $SKIPPED_REASON
8 exit $SKIPPED_EXIT_CODE
9fi
10
11if ! xtrabackup --help 2>&1 |
12 egrep '^innodb-checksum-algorithm[[:space:]]+innodb$'
13then
14 die "XtraBackup is using an incorrect default value for \
15--innodb-checksum-algorithm"
16fi
017
=== added file 'test/t/bug1248065.sh'
--- test/t/bug1248065.sh 1970-01-01 00:00:00 +0000
+++ test/t/bug1248065.sh 2013-11-05 11:54:45 +0000
@@ -0,0 +1,53 @@
1############################################################################
2# Bug #1248065: innodb_checksum_algorithm should be stored in backup-my.cnf
3############################################################################
4
5if [ ${MYSQL_VERSION:0:3} != "5.6" ]
6then
7 echo "Requires a 5.6 server" > $SKIPPED_REASON
8 exit $SKIPPED_EXIT_CODE
9fi
10
11function test_with_checksum_algo()
12{
13 vlog "**************************************"
14 vlog "Testing with innodb_checksum_algorithm=$1"
15 vlog "**************************************"
16
17 MYSQLD_EXTRA_MY_CNF_OPTS="
18innodb_checksum_algorithm=$1
19"
20
21 start_server
22 load_sakila
23
24 record_db_state sakila
25
26 innobackupex --no-timestamp $topdir/backup
27
28 egrep '^innodb_checksum_algorithm='$1'$' $topdir/backup/backup-my.cnf
29
30 stop_server
31 rm -rf $MYSQLD_DATADIR/*
32
33 innobackupex --apply-log --defaults-file=$topdir/backup/backup-my.cnf \
34 $topdir/backup
35
36 innobackupex --copy-back $topdir/backup
37
38 rm -rf $topdir/backup
39
40 start_server
41
42 verify_db_state sakila
43
44 stop_server
45
46 rm -rf $MYSQLD_VARDIR
47}
48
49# Test with strict_* values to force errors on algorithm mismatch
50
51test_with_checksum_algo strict_none
52test_with_checksum_algo strict_crc32
53test_with_checksum_algo strict_innodb

Subscribers

People subscribed via source and target branches