~ignacio-nin/percona-xtrabackup/2.1-bug1172916

« back to all changes in this revision

Viewing changes to test/t/xb_incremental_compressed.inc

  • Committer: Alexey Kopytov
  • Date: 2013-07-29 10:19:38 UTC
  • mfrom: (640.1.1 2.1)
  • Revision ID: akopytov@gmail.com-20130729101938-ilij8or5na2g1dov
MergedĀ lp:~akopytov/percona-xtrabackup/bug1190876-2.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# Test incremental backup with InnoDB compression
3
3
################################################################################
4
4
# Expects the following variable to be set before including:
5
 
#    mysqld_extra_args: an extra arg to be passed for all mysqld invocations.  
 
5
#    MYSQLD_EXTRA_MY_CNF_OPTS: an extra arg to be passed for all mysqld invocations.  
6
6
#                       Use this to set special options that influence 
7
7
#                       incremental backups, e.g. turns on log archiving or 
8
8
#                       changed page bitmap output.
42
42
 
43
43
  # Use innodb_strict_mode so that failure to use compression results in an 
44
44
  # error rather than a warning
45
 
  mysqld_additional_args="$mysqld_extra_args --innodb_strict_mode \
46
 
      --innodb_file_per_table --innodb_file_format=Barracuda \
47
 
      --innodb_max_dirty_pages_pct=0 --innodb_log_file_size=1M"
 
45
  MYSQLD_EXTRA_MY_CNF_OPTS="${MYSQLD_EXTRA_MY_CNF_OPTS:-""}
 
46
innodb_strict_mode
 
47
innodb_file_per_table
 
48
innodb_file_format=Barracuda
 
49
innodb_max_dirty_pages_pct=0
 
50
innodb_log_file_size=1M"
48
51
  
49
 
  start_server ${mysqld_additional_args}
 
52
  start_server
50
53
 
51
54
  load_dbase_schema incremental_sample
52
55
 
82
85
 
83
86
  vlog "Starting backup"
84
87
 
85
 
  xtrabackup --datadir=$mysql_datadir --backup --target-dir=$topdir/data/full ${mysqld_additional_args}
 
88
  xtrabackup --datadir=$mysql_datadir --backup --target-dir=$topdir/data/full
86
89
 
87
90
  vlog "Full backup done"
88
91
 
99
102
 
100
103
  # Rotate bitmap file here and force checkpoint at the same time
101
104
  shutdown_server
102
 
  start_server ${mysqld_additional_args}
 
105
  start_server
103
106
 
104
107
  add_rows test 12501 15000
105
108
  add_rows t2 12501 15000
139
142
  # Incremental backup
140
143
  xtrabackup --datadir=$mysql_datadir --backup \
141
144
      --target-dir=$topdir/data/delta --incremental-basedir=$topdir/data/full \
142
 
      ${mysqld_additional_args} $suspend_arg &
 
145
      $suspend_arg &
143
146
 
144
147
  xb_pid=$!
145
148
 
158
161
 
159
162
  # Prepare backup
160
163
  xtrabackup --datadir=$mysql_datadir --prepare \
161
 
      --apply-log-only --target-dir=$topdir/data/full ${mysqld_additional_args}
 
164
      --apply-log-only --target-dir=$topdir/data/full
162
165
  vlog "Log applied to backup"
163
166
  xtrabackup --datadir=$mysql_datadir --prepare \
164
167
      --apply-log-only --target-dir=$topdir/data/full \
165
 
      --incremental-dir=$topdir/data/delta ${mysqld_additional_args}
 
168
      --incremental-dir=$topdir/data/delta
166
169
  vlog "Delta applied to backup"
167
170
  xtrabackup --datadir=$mysql_datadir --prepare \
168
 
      --target-dir=$topdir/data/full ${mysqld_additional_args}
 
171
      --target-dir=$topdir/data/full
169
172
  vlog "Data prepared for restore"
170
173
 
171
174
  # removing rows
186
189
 
187
190
  vlog "Data restored"
188
191
 
189
 
  start_server ${mysqld_additional_args}
 
192
  start_server
190
193
 
191
194
  vlog "Checking checksums"
192
195
  checksum_test_b=`checksum_table incremental_sample test`