~percona-core/percona-xtrabackup/2.0

« back to all changes in this revision

Viewing changes to test/t/bug1248065.sh

  • Committer: Alexey Kopytov
  • Date: 2013-11-05 09:54:40 UTC
  • mto: This revision was merged to the branch mainline in revision 588.
  • Revision ID: akopytov@gmail.com-20131105095440-b6s71rpwm0wj3c3d
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.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
############################################################################
 
2
# Bug #1248065: innodb_checksum_algorithm should be stored in backup-my.cnf
 
3
############################################################################
 
4
 
 
5
if [ ${MYSQL_VERSION:0:3} != "5.6" ]
 
6
then
 
7
    echo "Requires a 5.6 server" > $SKIPPED_REASON
 
8
    exit $SKIPPED_EXIT_CODE
 
9
fi
 
10
 
 
11
function test_with_checksum_algo()
 
12
{
 
13
    vlog "**************************************"
 
14
    vlog "Testing with innodb_checksum_algorithm=$1"
 
15
    vlog "**************************************"
 
16
 
 
17
    MYSQLD_EXTRA_MY_CNF_OPTS="
 
18
innodb_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
 
 
51
test_with_checksum_algo strict_none
 
52
test_with_checksum_algo strict_crc32
 
53
test_with_checksum_algo strict_innodb