Merge lp:~akopytov/percona-xtrabackup/replication-support-in-test-suite-2.0 into lp:percona-xtrabackup/2.0

Proposed by Alexey Kopytov
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 438
Proposed branch: lp:~akopytov/percona-xtrabackup/replication-support-in-test-suite-2.0
Merge into: lp:percona-xtrabackup/2.0
Diff against target: 2429 lines (+546/-600)
61 files modified
innobackupex (+9/-23)
test/disabled/ib_include.sh (+0/-46)
test/disabled/tar_compressed.sh (+0/-110)
test/disabled/xb_lru_dump.sh (+0/-20)
test/experimental/bug408803.sh (+3/-4)
test/experimental/xb_race_drop.sh (+26/-2)
test/inc/common.sh (+262/-132)
test/inc/ib_stream_common.sh (+4/-4)
test/run.sh (+31/-40)
test/t/bug1002688.sh (+3/-4)
test/t/bug483827.sh (+6/-9)
test/t/bug489290.sh (+1/-2)
test/t/bug514068.sh (+2/-3)
test/t/bug606981.sh (+4/-4)
test/t/bug722638.sh (+6/-7)
test/t/bug723097.sh (+3/-4)
test/t/bug723318.sh (+4/-3)
test/t/bug729843.sh (+1/-2)
test/t/bug733651.sh (+1/-3)
test/t/bug759225.sh (+3/-4)
test/t/bug759701.sh (+3/-4)
test/t/bug766033.sh (+8/-13)
test/t/bug766607.sh (+5/-6)
test/t/bug810269.sh (+3/-5)
test/t/bug817132.sh (+3/-4)
test/t/bug884737.sh (+1/-2)
test/t/bug891496.sh (+4/-7)
test/t/bug972169.sh (+1/-3)
test/t/bug977101.sh (+31/-0)
test/t/bug983685.sh (+1/-3)
test/t/bug983720_galerainfo.sh (+1/-2)
test/t/bug983720_lrudump.sh (+1/-2)
test/t/bug989397.sh (+1/-2)
test/t/bug996493.sh (+2/-4)
test/t/bug999750.sh (+1/-3)
test/t/ib_binlog_info.sh (+1/-2)
test/t/ib_csm_csv.sh (+3/-4)
test/t/ib_empty_dir.sh (+2/-3)
test/t/ib_incremental.sh (+3/-4)
test/t/ib_lru_dump_basic.sh (+1/-2)
test/t/ib_lru_dump_rsync.sh (+1/-2)
test/t/ib_lru_dump_stream.sh (+1/-2)
test/t/ib_rsync.sh (+3/-4)
test/t/ib_slave_info.sh (+18/-7)
test/t/ib_specialchar.sh (+4/-4)
test/t/ib_stream_incremental.sh (+3/-4)
test/t/tar4ibd_symlink.sh (+19/-15)
test/t/xb_basic.sh (+5/-5)
test/t/xb_defaults_file.sh (+1/-2)
test/t/xb_export.sh (+14/-17)
test/t/xb_galera_info.sh (+2/-3)
test/t/xb_incremental.sh (+4/-4)
test/t/xb_incremental_compressed.sh (+5/-6)
test/t/xb_log_overwrap.sh (+2/-2)
test/t/xb_parallel.sh (+4/-4)
test/t/xb_parallel_incremental.sh (+4/-4)
test/t/xb_part_range.sh (+3/-4)
test/t/xb_partial.sh (+4/-4)
test/t/xb_perm_basic.sh (+1/-2)
test/t/xb_perm_stream.sh (+1/-2)
test/t/xb_stats.sh (+2/-2)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/replication-support-in-test-suite-2.0
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Review via email: mp+108772@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :
Revision history for this message
Stewart Smith (stewart) wrote :

same as for 1.6 merge req - free port allocation is racy.

review: Needs Fixing
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Implemented "port locking" in free port selection code. It's still
racey, but it's the best thing you can do in bash.

Revision history for this message
Alexey Kopytov (akopytov) wrote :
Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'innobackupex'
--- innobackupex 2012-05-23 17:06:52 +0000
+++ innobackupex 2012-06-12 10:40:23 +0000
@@ -1207,28 +1207,21 @@
1207#1207#
1208sub write_binlog_info {1208sub write_binlog_info {
1209 my @lines;1209 my @lines;
1210 my @info_lines = ();
1211 my $position = '';1210 my $position = '';
1212 my $filename = '';1211 my $filename = '';
12131212
1214 # get binlog position1213 # get binlog position
1215 mysql_send "SHOW MASTER STATUS;";1214 mysql_send 'SHOW MASTER STATUS\G';
12161215
1217 # get "show master status" output lines (2) from mysql output1216 # get the name of the last binlog file and position in it
1217 # from the SHOW MASTER STATUS output
1218 file_to_array($mysql_stdout, \@lines);1218 file_to_array($mysql_stdout, \@lines);
1219 foreach my $line (@lines) {1219 foreach (@lines) {
1220 if ($line =~ m/xtrabackup ping/) {1220 $filename = $1 if /^\s+File:\s(\S+)\s*$/;
1221 # this is a hello message, ignore it1221 $position = $1 if /^\s+Position:\s(\d+)\s*$/;
1222 } else {
1223 # this is output line from "show master status"
1224 push(@info_lines, $line);
1225 }
1226 }1222 }
12271223
1228 # write binlog info file1224 # write binlog info file
1229 if (!defined $info_lines[1]) {
1230 $info_lines[1] = "";
1231 }
1232 if (!$option_remote_host) {1225 if (!$option_remote_host) {
1233 open(FILE, ">$binlog_info") || 1226 open(FILE, ">$binlog_info") ||
1234 Die "Failed to open file '$binlog_info': $!";1227 Die "Failed to open file '$binlog_info': $!";
@@ -1236,7 +1229,7 @@
1236 open(FILE, "| ssh $option_ssh_opt $option_remote_host 'cat > $binlog_info'") ||1229 open(FILE, "| ssh $option_ssh_opt $option_remote_host 'cat > $binlog_info'") ||
1237 Die "Failed to open file '$option_remote_host:$binlog_info': $!";1230 Die "Failed to open file '$option_remote_host:$binlog_info': $!";
1238 }1231 }
1239 print FILE "$info_lines[1]\n";1232 print FILE "$filename\t$position\t\t\n";
1240 close(FILE);1233 close(FILE);
12411234
1242 if ($option_stream) {1235 if ($option_stream) {
@@ -1245,14 +1238,7 @@
1245 unlink $binlog_info || Die "Failed to delete '$binlog_info': $!";1238 unlink $binlog_info || Die "Failed to delete '$binlog_info': $!";
1246 }1239 }
12471240
1248 # get the name of the last binlog file and position in it1241 $mysql_binlog_position = "filename '$filename', position $position";
1249 ($filename, $position) = $info_lines[1] =~ /^\s*([^\s]+)\s+(.*)$/;
1250
1251 if (defined $filename && defined $position) {
1252 $mysql_binlog_position = "filename '$filename', position $position";
1253 } else {
1254 $mysql_binlog_position = "filename '', position ";
1255 }
1256}1242}
12571243
1258#1244#
@@ -1314,7 +1300,7 @@
1314 1300
1315 # get slave status. Use single quotes here, otherwise1301 # get slave status. Use single quotes here, otherwise
1316 # \G is evaluated as a control character.1302 # \G is evaluated as a control character.
1317 mysql_send 'SHOW SLAVE STATUS\G;';1303 mysql_send 'SHOW SLAVE STATUS\G';
13181304
1319 # get output of the "show slave status" command from mysql output1305 # get output of the "show slave status" command from mysql output
1320 # and extract binlog position of the master server1306 # and extract binlog position of the master server
13211307
=== removed file 'test/disabled/ib_include.sh'
--- test/disabled/ib_include.sh 2011-03-16 19:41:17 +0000
+++ test/disabled/ib_include.sh 1970-01-01 00:00:00 +0000
@@ -1,46 +0,0 @@
1. inc/common.sh
2
3init
4run_mysqld
5run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create database include;"
6run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create table t1 (a int) ENGINE=MyISAM;" include
7run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create table t2 (a int) ENGINE=InnoDB;" include
8run_cmd ${MYSQL} ${MYSQL_ARGS} -e "insert into t1 values (1),(2),(3);" include
9run_cmd ${MYSQL} ${MYSQL_ARGS} -e "insert into t2 values (1),(2),(3);" include
10# Take backup
11mkdir -p $topdir/backup
12checksum_t1=`${MYSQL} ${MYSQL_ARGS} -Ns -e "checksum table t1" include | awk '{print $2}'`
13checksum_t2=`${MYSQL} ${MYSQL_ARGS} -Ns -e "checksum table t2" include | awk '{print $2}'`
14vlog "checksum_t1 is $checksum_t1"
15vlog "checksum_t2 is $checksum_t2"
16run_cmd ${IB_BIN} --user=root --socket=$mysql_socket --include="^include[.]t" $topdir/backup > $OUTFILE 2>&1
17backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'`
18stop_mysqld
19# Remove datadir
20rm -r $mysql_datadir
21# Restore data
22vlog "Applying log"
23echo "###########" >> $OUTFILE
24echo "# PREPARE #" >> $OUTFILE
25echo "###########" >> $OUTFILE
26run_cmd ${IB_BIN} --apply-log $backup_dir >> $OUTFILE 2>&1
27vlog "Restoring MySQL datadir"
28mkdir -p $mysql_datadir
29echo "###########" >> $OUTFILE
30echo "# RESTORE #" >> $OUTFILE
31echo "###########" >> $OUTFILE
32run_cmd ${IB_BIN} --copy-back $backup_dir >> $OUTFILE 2>&1
33run_mysqld
34checksum_tt1=`${MYSQL} ${MYSQL_ARGS} -Ns -e "checksum table t1" include | awk '{print $2}'`
35checksum_tt2=`${MYSQL} ${MYSQL_ARGS} -Ns -e "checksum table t2" include | awk '{print $2}'`
36vlog "checksum_tt1 is $checksum_tt1"
37vlog "checksum_tt2 is $checksum_tt2"
38if [ (( ($checksum_t2 -eq $checksum_tt2) || ($checksum_t1 -eq $checksum_tt1) )) ]
39then
40 vlog "Checksums are OK"
41else
42 vlog "Checksums are not equal"
43 exit -1
44fi
45stop_mysqld
46clean
470
=== removed file 'test/disabled/tar_compressed.sh'
--- test/disabled/tar_compressed.sh 2011-04-22 02:41:31 +0000
+++ test/disabled/tar_compressed.sh 1970-01-01 00:00:00 +0000
@@ -1,110 +0,0 @@
1################################################################################
2# Test of streaming backups with InnoDB compression
3################################################################################
4
5. inc/common.sh
6
7if [ "$MYSQL_VERSION" = "5.0" ]; then
8 exit $SKIPPED_EXIT_CODE
9fi
10
11function test_incremental_compressed()
12{
13 page_size=$1
14
15 echo "************************************************************************"
16 echo "Testing streaming backup with compressed page size=${page_size}KB "
17 echo "************************************************************************"
18
19 # Use innodb_strict_mode so that failure to use compression results in an
20 # error rather than a warning
21 if [ "$MYSQL_VERSION" = "5.1" ]; then
22 mysqld_additional_args="--ignore_builtin_innodb --innodb_strict_mode --plugin-load=innodb=ha_innodb_plugin.so --innodb_file_per_table --innodb_file_format=Barracuda"
23 else
24 mysqld_additional_args="--innodb_strict_mode --innodb_file_per_table --innodb_file_format=Barracuda"
25 fi
26
27 run_mysqld ${mysqld_additional_args}
28 load_dbase_schema incremental_sample
29
30 vlog "Compressing the table"
31
32 run_cmd ${MYSQL} ${MYSQL_ARGS} -e \
33 "ALTER TABLE test ENGINE=InnoDB ROW_FORMAT=compressed KEY_BLOCK_SIZE=$page_size" incremental_sample
34
35 # Adding 10k rows
36 vlog "Adding initial rows to database..."
37 numrow=10000
38 count=0
39 while [ "$numrow" -gt "$count" ]; do
40 sql="INSERT INTO test VALUES ($count, $numrow)"
41 let "count=count+1"
42 for ((i=0; $i<99; i++)); do
43 sql="${sql},($count, $numrow)"
44 let "count=count+1"
45 done
46 ${MYSQL} ${MYSQL_ARGS} -e "$sql" incremental_sample
47 done
48
49 rows=`${MYSQL} ${MYSQL_ARGS} -Ns -e "SELECT COUNT(*) FROM test" incremental_sample`
50 if [ "$rows" != "10000" ]; then
51 vlog "Failed to add initial rows"
52 exit -1
53 fi
54 vlog "Initial rows added"
55
56 # Create directory for backup files
57 rm -rf $topdir/data/full
58 mkdir -p $topdir/data/full
59
60 # Start streaming backuop
61 vlog "Starting backup"
62 ${IB_BIN} --socket=$mysql_socket --stream=tar $topdir/data/full > $topdir/data/full/out.tar 2>$OUTFILE
63
64 # Saving the checksum of original table
65 checksum_a=`${MYSQL} ${MYSQL_ARGS} -Ns -e "checksum table test;" incremental_sample | awk '{print $2}'`
66 vlog "Table checksum is $checksum_a"
67
68
69 # Prepare backup
70 vlog "Preparing backup"
71 cd $topdir/data/full
72 tar -ixf out.tar
73 cd - > /dev/null 2>&1
74 run_cmd ${IB_BIN} --apply-log $topdir/data/full >> $OUTFILE 2>&1
75 vlog "Data prepared for restore"
76
77 # removing rows
78 vlog "Table cleared"
79 ${MYSQL} ${MYSQL_ARGS} -e "delete from test;" incremental_sample
80
81 # Restore backup
82 stop_mysqld
83 vlog "Copying files"
84 run_cmd ${IB_BIN} --copy-back $topdir/data/full >> $OUTFILE 2>&1
85 vlog "Data restored"
86
87 # Comparing checksums
88 run_mysqld ${mysqld_additional_args}
89 vlog "Cheking checksums"
90 checksum_b=`${MYSQL} ${MYSQL_ARGS} -Ns -e "checksum table test;" incremental_sample | awk '{print $2}'`
91
92 if [ $checksum_a -ne $checksum_b ]
93 then
94 vlog "Checksums are not equal"
95 exit -1
96 fi
97
98 vlog "Checksums are OK"
99
100 drop_dbase incremental_sample
101 stop_mysqld
102}
103
104init
105
106for page_size in 1 2 4 8 16; do
107 test_incremental_compressed ${page_size}
108done
109
110clean
1110
=== removed file 'test/disabled/xb_lru_dump.sh'
--- test/disabled/xb_lru_dump.sh 2011-03-30 10:30:35 +0000
+++ test/disabled/xb_lru_dump.sh 1970-01-01 00:00:00 +0000
@@ -1,20 +0,0 @@
1. inc/common.sh
2
3init
4run_mysqld
5
6run_cmd ${MYSQL} ${MYSQL_ARGS} -e "select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_LRU_DUMP*/;"
7
8mkdir -p $topdir/backup
9run_cmd ${XB_BIN} --datadir=$mysql_datadir --backup --target-dir=$topdir/backup
10
11stop_mysqld
12
13if [ -f $topdir/backup/ib_lru_dump ]
14then
15 vlog "LRU dump has been backuped"
16 clean
17else
18 vlog "LRU dump was not backuped"
19 exit -1
20fi
210
=== modified file 'test/experimental/bug408803.sh'
--- test/experimental/bug408803.sh 2011-06-09 18:34:00 +0000
+++ test/experimental/bug408803.sh 2012-06-12 10:40:23 +0000
@@ -1,7 +1,6 @@
1. inc/common.sh1. inc/common.sh
22
3init3start_server --interactive_timeout=1 --wait_timeout=1
4run_mysqld --interactive_timeout=1 --wait_timeout=1
5load_dbase_schema sakila4load_dbase_schema sakila
6load_dbase_data sakila5load_dbase_data sakila
76
@@ -11,7 +10,7 @@
11backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'`10backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'`
12vlog "Backup dir in $backup_dir"11vlog "Backup dir in $backup_dir"
1312
14stop_mysqld13stop_server
15# Remove datadir14# Remove datadir
16rm -r $mysql_datadir15rm -r $mysql_datadir
17# Restore sakila16# Restore sakila
@@ -28,6 +27,6 @@
28echo "###########" >> $OUTFILE27echo "###########" >> $OUTFILE
29innobackupex --copy-back $full_backup_dir >> $OUTFILE 2>&128innobackupex --copy-back $full_backup_dir >> $OUTFILE 2>&1
3029
31run_mysqld30start_server
32# Check sakila31# Check sakila
33${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila32${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila
3433
=== modified file 'test/experimental/xb_race_drop.sh'
--- test/experimental/xb_race_drop.sh 2011-06-10 07:55:26 +0000
+++ test/experimental/xb_race_drop.sh 2012-06-12 10:40:23 +0000
@@ -1,7 +1,31 @@
1. inc/common.sh1. inc/common.sh
22
3init3function race_create_drop()
4run_mysqld --innodb_file_per_table4{
5 vlog "Started create/drop table cycle"
6 race_cycle_num=$1
7 if [ -z $race_cycle_num ]
8 then
9 race_cycle_num=1000
10 fi
11 run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create database race;"
12 race_cycle_cnt=0;
13 while [ "$race_cycle_num" -gt "$race_cycle_cnt"]
14 do
15 t1=tr$RANDOM
16 t2=tr$RANDOM
17 t3=tr$RANDOM
18 ${MYSQL} ${MYSQL_ARGS} -e "create table $t1 (a int) ENGINE=InnoDB;" race
19 ${MYSQL} ${MYSQL_ARGS} -e "create table $t2 (a int) ENGINE=InnoDB;" race
20 ${MYSQL} ${MYSQL_ARGS} -e "create table $t3 (a int) ENGINE=InnoDB;" race
21 ${MYSQL} ${MYSQL_ARGS} -e "drop table $t1;" race
22 ${MYSQL} ${MYSQL_ARGS} -e "drop table $t2;" race
23 ${MYSQL} ${MYSQL_ARGS} -e "drop table $t3;" race
24 let "race_cycle_cnt=race_cycle_cnt+1"
25 done
26}
27
28start_server --innodb_file_per_table
529
6run_cmd race_create_drop &30run_cmd race_create_drop &
731
832
=== modified file 'test/inc/common.sh'
--- test/inc/common.sh 2012-02-10 20:05:56 +0000
+++ test/inc/common.sh 2012-06-12 10:40:23 +0000
@@ -17,25 +17,10 @@
17 echo "`date +"%F %T"`: `basename "$0"`: $@" >&217 echo "`date +"%F %T"`: `basename "$0"`: $@" >&2
18}18}
1919
20function clean_datadir()
21{
22 vlog "Removing MySQL data directory: $mysql_datadir"
23 rm -rf "$mysql_datadir"
24 vlog "Creating MySQL data directory: $mysql_datadir"
25 mkdir -p "$mysql_datadir"
26 init_mysql_dir
27}
2820
29function clean()21function clean()
30{22{
31 vlog "Removing temporary $topdir"23 rm -rf ${TEST_BASEDIR}/var[0-9]
32 rm -rf "$topdir"
33}
34function clean_on_error()
35{
36vlog "Exit on error"
37clean
38exit -1
39}24}
4025
41function die()26function die()
@@ -44,86 +29,46 @@
44 exit 129 exit 1
45}30}
4631
47function initdir()
48{
49 if test -d "$topdir"
50 then
51 vlog "Directory $topdir exists. Removing it..."
52 rm -r "$topdir"
53 fi
54 vlog "Creating temporary directory: $topdir"
55 mkdir -p "$topdir/tmp"
56 vlog "Creating MySQL data directory: $mysql_datadir"
57 mkdir -p "$mysql_datadir"
58}
59
60function init_mysql_dir()32function init_mysql_dir()
61{33{
62 vlog "Creating MySQL database"34 if [ ! -d "$MYSQLD_VARDIR" ]
63 $MYSQL_INSTALL_DB --no-defaults --basedir=$MYSQL_BASEDIR --datadir="$mysql_datadir" --tmpdir="$mysql_tmpdir"35 then
64}36 vlog "Creating server root directory: $MYSQLD_VARDIR"
65function set_mysql_port()37 mkdir "$MYSQLD_VARDIR"
66{38 fi
67 i=$mysql_port39 if [ ! -d "$MYSQLD_TMPDIR" ]
68 while [ $i -lt 65536 ]40 then
69 do41 vlog "Creating server temporary directory: $MYSQLD_TMPDIR"
70 # check if port $i is used42 mkdir "$MYSQLD_TMPDIR"
71 vlog "Checking port $i"43 fi
72 port_status=`netstat -an | grep LISTEN | grep tcp | grep -w "$i " || true`44 if [ ! -d "$MYSQLD_DATADIR" ]
73 if test -z "$port_status"45 then
74 then46 vlog "Creating server data directory: $MYSQLD_DATADIR"
75 # port is not used47 mkdir -p "$MYSQLD_DATADIR"
76 vlog "Port $i is free"48 vlog "Calling mysql_install_db"
77 mysql_port=$i49 $MYSQL_INSTALL_DB --no-defaults --basedir=$MYSQL_BASEDIR --datadir="$MYSQLD_DATADIR" --tmpdir="$MYSQLD_TMPDIR"
78 break50 fi
79 else
80 vlog "Port $i is used"
81 let i=$i+1
82 fi
83 done
84}51}
8552
53########################################################################
86# Checks whether MySQL is alive54# Checks whether MySQL is alive
55########################################################################
87function mysql_ping()56function mysql_ping()
88{57{
89 local result="0"58 $MYSQLADMIN $MYSQL_ARGS --wait=100 ping >/dev/null 2>&1 || return 1
90 if test -S ${mysql_socket}
91 then
92 result=`${MYSQL} ${MYSQL_ARGS} -e "SELECT IF(COUNT(*)>=0, 1, 1) FROM user;" -s --skip-column-names mysql 2>/dev/null` || result="0"
93 else
94 result="0"
95 fi
96 echo $result
97}59}
9860
99function kill_leftovers()61function kill_leftovers()
100{62{
101 while test -f "$PIDDIR/mysqld.pid" 63 local file
102 do64 for file in ${TEST_BASEDIR}/mysqld*.pid
103 vlog "Found a leftover mysqld processes with PID `cat $PIDDIR/mysqld.pid`, stopping it"65 do
104 stop_mysqld 2> /dev/null66 if [ -f $file ]
105 done67 then
106}68 vlog "Found a leftover mysqld processes with PID `cat $file`, stopping it"
10769 kill -9 `cat $file` 2>/dev/null || true
108function run_mysqld()70 fi
109{71 done
110 local c=0
111 kill_leftovers
112 ${MYSQLD} ${MYSQLD_ARGS} $* --pid-file="$PIDDIR/mysqld.pid" &
113 while [ "`mysql_ping`" != "1" ]
114 do
115 if [ ${c} -eq 100 ]
116 then
117 vlog "Can't run MySQL!"
118 clean_on_error
119 fi
120 let c=${c}+1
121 sleep 1
122 done
123 if [ -n "$MYSQL_VERSION" -a -n "$INNODB_VERSION" ]
124 then
125 vlog "MySQL $MYSQL_VERSION (InnoDB $INNODB_VERSION) started successfully"
126 fi
127}72}
12873
129function run_cmd()74function run_cmd()
@@ -152,21 +97,6 @@
152 fi97 fi
153}98}
15499
155function stop_mysqld()
156{
157 if [ -f "$PIDDIR/mysqld.pid" ]
158 then
159 ${MYSQLADMIN} ${MYSQL_ARGS} shutdown
160 vlog "Database server has been stopped"
161 if [ -f "$PIDDIR/mysqld.pid" ]
162 then
163 sleep 1;
164 kill -9 `cat $PIDDIR/mysqld.pid`
165 rm -f $PIDDIR/mysqld.pid
166 fi
167 fi
168}
169
170function load_sakila()100function load_sakila()
171{101{
172vlog "Loading sakila"102vlog "Loading sakila"
@@ -196,39 +126,236 @@
196 run_cmd ${MYSQL} ${MYSQL_ARGS} -e "DROP DATABASE $1"126 run_cmd ${MYSQL} ${MYSQL_ARGS} -e "DROP DATABASE $1"
197}127}
198128
199function init()129########################################################################
200{130# Choose a free port for a MySQL server instance
201initdir131########################################################################
202init_mysql_dir132function get_free_port()
203echo "133{
134 local id=$1
135 local port
136 local lockfile
137
138 for (( port=PORT_BASE+id; port < 65535; port++))
139 do
140 lockfile="/tmp/xtrabackup_port_lock.$port"
141 # Try to atomically lock the current port number
142 if ! set -C > $lockfile
143 then
144 set +C
145 # check if the process still exists
146 if kill -0 "`cat $lockfile`"
147 then
148 continue;
149 fi
150 # stale file, overwrite it with the current PID
151 fi
152 set +C
153 echo $$ > $lockfile
154 if ! nc -z -w1 localhost $port >/dev/null 2>&1
155 then
156 echo $port
157 return 0
158 fi
159 rm -f $lockfile
160 done
161
162 die "Could not find a free port for server id $id!"
163}
164
165########################################################################
166# Initialize server variables such as datadir, tmpdir, etc. and store
167# them with the specified index in SRV_MYSQLD_* arrays to be used by
168# switch_server() later
169########################################################################
170function init_server_variables()
171{
172 local id=$1
173
174 if [ -n ${SRV_MYSQLD_IDS[$id]:-""} ]
175 then
176 die "Server with id $id has already been started"
177 fi
178
179 SRV_MYSQLD_IDS[$id]="$id"
180 local vardir="${TEST_BASEDIR}/var${id}"
181 SRV_MYSQLD_VARDIR[$id]="$vardir"
182 SRV_MYSQLD_DATADIR[$id]="$vardir/data"
183 SRV_MYSQLD_TMPDIR[$id]="$vardir/tmp"
184 SRV_MYSQLD_PIDFILE[$id]="${TEST_BASEDIR}/mysqld${id}.pid"
185 SRV_MYSQLD_PORT[$id]=`get_free_port $id`
186 SRV_MYSQLD_SOCKET[$id]=`mktemp -t xtrabackup.mysql.sock.XXXXXX`
187}
188
189########################################################################
190# Reset server variables
191########################################################################
192function reset_server_variables()
193{
194 local id=$1
195
196 if [ -z ${SRV_MYSQLD_VARDIR[$id]:-""} ]
197 then
198 # Variables have already been reset
199 return 0;
200 fi
201
202 SRV_MYSQLD_IDS[$id]=
203 SRV_MYSQLD_VARDIR[$id]=
204 SRV_MYSQLD_DATADIR[$id]=
205 SRV_MYSQLD_TMPDIR[$id]=
206 SRV_MYSQLD_PIDFILE[$id]=
207 SRV_MYSQLD_PORT[$id]=
208 SRV_MYSQLD_SOCKET[$id]=
209}
210
211##########################################################################
212# Change the environment to make all utilities access the server with an
213# id specified in the argument.
214##########################################################################
215function switch_server()
216{
217 local id=$1
218
219 MYSQLD_VARDIR="${SRV_MYSQLD_VARDIR[$id]}"
220 MYSQLD_DATADIR="${SRV_MYSQLD_DATADIR[$id]}"
221 MYSQLD_TMPDIR="${SRV_MYSQLD_TMPDIR[$id]}"
222 MYSQLD_PIDFILE="${SRV_MYSQLD_PIDFILE[$id]}"
223 MYSQLD_PORT="${SRV_MYSQLD_PORT[$id]}"
224 MYSQLD_SOCKET="${SRV_MYSQLD_SOCKET[$id]}"
225
226 MYSQL_ARGS="--no-defaults --socket=${MYSQLD_SOCKET} --user=root"
227 MYSQLD_ARGS="--no-defaults --basedir=${MYSQL_BASEDIR} \
228--socket=${MYSQLD_SOCKET} --port=${MYSQLD_PORT} --server-id=$id \
229--datadir=${MYSQLD_DATADIR} --tmpdir=${MYSQLD_TMPDIR} --log-bin=mysql-bin \
230--relay-log=mysql-relay-bin --pid-file=${MYSQLD_PIDFILE} ${MYSQLD_EXTRA_ARGS}"
231 if [ "`whoami`" = "root" ]
232 then
233 MYSQLD_ARGS="$MYSQLD_ARGS --user=root"
234 fi
235
236 IB_ARGS="--defaults-file=${MYSQLD_VARDIR}/my.cnf --user=root \
237--socket=${MYSQLD_SOCKET} --ibbackup=$XB_BIN"
238 XB_ARGS="--no-defaults"
239
240 # Some aliases for compatibility, as tests use the following names
241 topdir="$MYSQLD_VARDIR"
242 mysql_datadir="$MYSQLD_DATADIR"
243 mysql_tmpdir="$MYSQLD_TMPDIR"
244 mysql_socket="$MYSQLD_SOCKET"
245}
246
247########################################################################
248# Start server with the id specified as the first argument
249########################################################################
250function start_server_with_id()
251{
252 local id=$1
253 shift
254
255 vlog "Starting server with id=$id..."
256
257 init_server_variables $id
258 switch_server $id
259
260 init_mysql_dir
261 cat > ${MYSQLD_VARDIR}/my.cnf <<EOF
204[mysqld]262[mysqld]
205datadir=$mysql_datadir263datadir=${MYSQLD_DATADIR}
206tmpdir=$mysql_tmpdir" > $topdir/my.cnf264tmpdir=${MYSQLD_TMPDIR}
207}265EOF
208266
209function race_create_drop()267 # Start the server
210{268 ${MYSQLD} ${MYSQLD_ARGS} $* &
211 vlog "Started create/drop table cycle"269 if ! mysql_ping
212 race_cycle_num=$1270 then
213 if [ -z $race_cycle_num ]271 die "Can't start the server!"
214 then272 fi
215 race_cycle_num=1000273 vlog "Server with id=$id has been started on port $MYSQLD_PORT, \
216 fi274socket $MYSQLD_SOCKET"
217 run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create database race;"275}
218 race_cycle_cnt=0;276
219 while [ "$race_cycle_num" -gt "$race_cycle_cnt"]277########################################################################
220 do278# Stop server with the id specified as the first argument and additional
221 t1=tr$RANDOM279# command line arguments (if specified)
222 t2=tr$RANDOM280########################################################################
223 t3=tr$RANDOM281function stop_server_with_id()
224 ${MYSQL} ${MYSQL_ARGS} -e "create table $t1 (a int) ENGINE=InnoDB;" race282{
225 ${MYSQL} ${MYSQL_ARGS} -e "create table $t2 (a int) ENGINE=InnoDB;" race283 local id=$1
226 ${MYSQL} ${MYSQL_ARGS} -e "create table $t3 (a int) ENGINE=InnoDB;" race284 switch_server $id
227 ${MYSQL} ${MYSQL_ARGS} -e "drop table $t1;" race285
228 ${MYSQL} ${MYSQL_ARGS} -e "drop table $t2;" race286 vlog "Stopping server with id=$id..."
229 ${MYSQL} ${MYSQL_ARGS} -e "drop table $t3;" race287
230 let "race_cycle_cnt=race_cycle_cnt+1"288 if [ -f "${MYSQLD_PIDFILE}" ]
231 done289 then
290 ${MYSQLADMIN} ${MYSQL_ARGS} --shutdown-timeout=60 shutdown
291 if [ -f "${MYSQLD_PIDFILE}" ]
292 then
293 vlog "Could not stop the server with id=$id, using kill -9"
294 kill -9 `cat ${MYSQLD_PIDFILE}`
295 rm -f ${MYSQLD_PIDFILE}
296 fi
297 vlog "Server with id=$id has been stopped"
298 else
299 vlog "Server pid file '${MYSQLD_PIDFILE}' doesn't exist!"
300 fi
301
302 # unlock the port number
303 rm -f /tmp/xtrabackup_port_lock.$MYSQLD_PORT
304
305 reset_server_variables $id
306}
307
308########################################################################
309# Start server with id=1 and additional command line arguments
310# (if specified)
311########################################################################
312function start_server()
313{
314 start_server_with_id 1 $*
315}
316
317########################################################################
318# Stop server with id=1
319########################################################################
320function stop_server()
321{
322 stop_server_with_id 1
323}
324
325########################################################################
326# Stop all running servers
327########################################################################
328function stop_all_servers()
329{
330 local id
331 for id in ${SRV_MYSQLD_IDS[*]}
332 do
333 stop_server_with_id ${SRV_MYSQLD_IDS[$id]}
334 done
335}
336
337########################################################################
338# Configure a specified server as a slave
339# Synopsis:
340# setup_slave <slave_id> <master_id>
341#########################################################################
342function setup_slave()
343{
344 local slave_id=$1
345 local master_id=$2
346
347 vlog "Setting up server #$slave_id as a slave of server #$master_id"
348
349 switch_server $slave_id
350
351 run_cmd $MYSQL $MYSQL_ARGS <<EOF
352CHANGE MASTER TO
353 MASTER_HOST='localhost',
354 MASTER_USER='root',
355 MASTER_PORT=${SRV_MYSQLD_PORT[$master_id]};
356
357START SLAVE
358EOF
232}359}
233360
234########################################################################361########################################################################
@@ -239,3 +366,6 @@
239{366{
240 $MYSQL $MYSQL_ARGS -Ns -e "CHECKSUM TABLE $2" $1 | awk {'print $2'}367 $MYSQL $MYSQL_ARGS -Ns -e "CHECKSUM TABLE $2" $1 | awk {'print $2'}
241}368}
369
370# To avoid unbound variable error when no server have been started
371SRV_MYSQLD_IDS=
242372
=== modified file 'test/inc/ib_stream_common.sh'
--- test/inc/ib_stream_common.sh 2012-02-10 20:05:56 +0000
+++ test/inc/ib_stream_common.sh 2012-06-12 10:40:23 +0000
@@ -12,8 +12,8 @@
1212
13. inc/common.sh13. inc/common.sh
1414
15init15start_server --innodb_file_per_table
16run_mysqld --innodb_file_per_table16
17load_dbase_schema sakila17load_dbase_schema sakila
18load_dbase_data sakila18load_dbase_data sakila
1919
@@ -23,7 +23,7 @@
23mkdir -p $topdir/backup23mkdir -p $topdir/backup
24innobackupex --stream=$stream_format $innobackupex_options $topdir/backup > $topdir/backup/out24innobackupex --stream=$stream_format $innobackupex_options $topdir/backup > $topdir/backup/out
2525
26stop_mysqld26stop_server
2727
28# Remove datadir28# Remove datadir
29rm -r $mysql_datadir29rm -r $mysql_datadir
@@ -46,6 +46,6 @@
46vlog "###########"46vlog "###########"
47innobackupex --copy-back $backup_dir47innobackupex --copy-back $backup_dir
4848
49run_mysqld49start_server
50# Check sakila50# Check sakila
51run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila51run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila
5252
=== modified file 'test/run.sh'
--- test/run.sh 2012-02-10 20:05:56 +0000
+++ test/run.sh 2012-06-12 10:40:23 +0000
@@ -1,5 +1,7 @@
1#!/bin/bash1#!/bin/bash
22
3export DEBUG=
4
3. inc/common.sh5. inc/common.sh
46
5set +e7set +e
@@ -14,7 +16,7 @@
14Usage: $0 [-f] [-g] [-h] [-s suite] [-t test_name] [-d mysql_basedir] [-c build_conf]16Usage: $0 [-f] [-g] [-h] [-s suite] [-t test_name] [-d mysql_basedir] [-c build_conf]
15-f Continue running tests after failures17-f Continue running tests after failures
16-d path Server installation directory. Default is './server'.18-d path Server installation directory. Default is './server'.
17-g Output debug information to results/*.out19-g Debug mode
18-t path Run only a single named test20-t path Run only a single named test
19-h Print this help message21-h Print this help message
20-s suite Select a test suite to run. Possible values: experimental, t. 22-s suite Select a test suite to run. Possible values: experimental, t.
@@ -52,13 +54,9 @@
5254
53function set_vars()55function set_vars()
54{56{
55 topdir="`pwd`/var"57 TEST_BASEDIR="$PWD"
56 mysql_datadir="$topdir/mysql"58 MYSQL_BASEDIR=${MYSQL_BASEDIR:-"$PWD/server"}
57 mysql_tmpdir="$topdir/tmp"59 PORT_BASE=$((3306 + $RANDOM))
58 mysql_port="3306"
59 mysql_socket=`mktemp -t xtrabackup.mysql.sock.XXXXXX`
60 IB_ARGS="--defaults-file=$topdir/my.cnf --user=root --socket=$mysql_socket"
61 XB_ARGS="--no-defaults"
6260
63 if gnutar --version > /dev/null 2>&161 if gnutar --version > /dev/null 2>&1
64 then62 then
@@ -67,16 +65,6 @@
67 TAR=tar65 TAR=tar
68 fi66 fi
6967
70 MYSQL_BASEDIR=${MYSQL_BASEDIR:-"$PWD/server"}
71
72 MYSQL_ARGS="--no-defaults --socket=${mysql_socket} --user=root"
73
74 MYSQLD_ARGS="--no-defaults --basedir=${MYSQL_BASEDIR} --socket=${mysql_socket} --datadir=$mysql_datadir --tmpdir=$mysql_tmpdir --skip-networking"
75 if [ "`whoami`" = "root" ]
76 then
77 MYSQLD_ARGS="$MYSQLD_ARGS --user=root"
78 fi
79
80 find_program MYSQL_INSTALL_DB mysql_install_db $MYSQL_BASEDIR/bin \68 find_program MYSQL_INSTALL_DB mysql_install_db $MYSQL_BASEDIR/bin \
81 $MYSQL_BASEDIR/scripts69 $MYSQL_BASEDIR/scripts
82 find_program MYSQLD mysqld $MYSQL_BASEDIR/bin/ $MYSQL_BASEDIR/libexec70 find_program MYSQLD mysqld $MYSQL_BASEDIR/bin/ $MYSQL_BASEDIR/libexec
@@ -92,22 +80,26 @@
9280
93 PATH="${MYSQL_BASEDIR}/bin:$PATH"81 PATH="${MYSQL_BASEDIR}/bin:$PATH"
9482
95 export topdir mysql_datadir mysql_tmpdir mysql_port mysql_socket OUTFILE \83 export TEST_BASEDIR PORT_BASE TAR MYSQL_BASEDIR MYSQL MYSQLD MYSQLADMIN \
96 IB_ARGS XB_ARGS TAR MYSQL_BASEDIR MYSQL MYSQLADMIN \84MYSQL_INSTALL_DB PATH
97 MYSQL_ARGS MYSQLD_ARGS MYSQL_INSTALL_DB MYSQLD PATH
98}85}
9986
100function get_version_info()87function get_version_info()
101{88{
89 MYSQLD_EXTRA_ARGS=
90
91 XB_BIN=""
92 IB_ARGS="--user=root --ibbackup=$XB_BIN"
93 XB_ARGS="--no-defaults"
94
102 if [ "$XB_BUILD" != "autodetect" ]95 if [ "$XB_BUILD" != "autodetect" ]
103 then96 then
104 XB_BIN=""
105 case "$XB_BUILD" in97 case "$XB_BUILD" in
106 "innodb51_builtin" )98 "innodb51_builtin" )
107 XB_BIN="xtrabackup_51";;99 XB_BIN="xtrabackup_51";;
108 "innodb51" )100 "innodb51" )
109 XB_BIN="xtrabackup_plugin"101 XB_BIN="xtrabackup_plugin"
110 MYSQLD_ARGS="$MYSQLD_ARGS --ignore-builtin-innodb --plugin-load=innodb=ha_innodb_plugin.so";;102 MYSQLD_EXTRA_ARGS="--ignore-builtin-innodb --plugin-load=innodb=ha_innodb_plugin.so";;
111 "innodb55" )103 "innodb55" )
112 XB_BIN="xtrabackup_innodb55";;104 XB_BIN="xtrabackup_innodb55";;
113 "xtradb51" )105 "xtradb51" )
@@ -124,11 +116,11 @@
124 fi116 fi
125 fi117 fi
126118
127 init >>$OUTFILE 2>&1
128
129 MYSQL_VERSION=""119 MYSQL_VERSION=""
130 INNODB_VERSION=""120 INNODB_VERSION=""
131 run_mysqld >>$OUTFILE 2>&1121
122 start_server >>$OUTFILE 2>&1
123
132 # Get MySQL and InnoDB versions124 # Get MySQL and InnoDB versions
133 MYSQL_VERSION=`$MYSQL ${MYSQL_ARGS} -Nsf -e "SHOW VARIABLES LIKE 'version'"`125 MYSQL_VERSION=`$MYSQL ${MYSQL_ARGS} -Nsf -e "SHOW VARIABLES LIKE 'version'"`
134 MYSQL_VERSION=${MYSQL_VERSION#"version "}126 MYSQL_VERSION=${MYSQL_VERSION#"version "}
@@ -178,15 +170,15 @@
178 vlog "Cannot find 'innobackupex' in PATH"170 vlog "Cannot find 'innobackupex' in PATH"
179 return 1171 return 1
180 fi172 fi
181 IB_ARGS="$IB_ARGS --ibbackup=$XB_BIN"173
174 stop_server
182175
183 export MYSQL_VERSION MYSQL_VERSION_COMMENT INNODB_VERSION XTRADB_VERSION \176 export MYSQL_VERSION MYSQL_VERSION_COMMENT INNODB_VERSION XTRADB_VERSION \
184 XB_BIN IB_BIN IB_ARGS177 XB_BIN IB_BIN IB_ARGS XB_ARGS MYSQLD_EXTRA_ARGS
185}178}
186179
187export SKIPPED_EXIT_CODE=200180export SKIPPED_EXIT_CODE=200
188181
189
190tname=""182tname=""
191XTRACE_OPTION=""183XTRACE_OPTION=""
192XB_BUILD="autodetect"184XB_BUILD="autodetect"
@@ -195,7 +187,7 @@
195 case $options in187 case $options in
196 f ) force="yes";;188 f ) force="yes";;
197 t ) tname="$OPTARG";;189 t ) tname="$OPTARG";;
198 g ) XTRACE_OPTION="-x";;190 g ) XTRACE_OPTION="-x"; DEBUG=on;;
199 h ) usage; exit;;191 h ) usage; exit;;
200 s ) tname="$OPTARG/*.sh";;192 s ) tname="$OPTARG/*.sh";;
201 d ) export MYSQL_BASEDIR="$OPTARG";;193 d ) export MYSQL_BASEDIR="$OPTARG";;
@@ -219,7 +211,8 @@
219total_count=0211total_count=0
220212
221export OUTFILE="$PWD/results/setup"213export OUTFILE="$PWD/results/setup"
222export PIDDIR="$PWD"214
215clean >>$OUTFILE 2>&1
223216
224if ! get_version_info217if ! get_version_info
225then218then
@@ -258,6 +251,12 @@
258 bash $XTRACE_OPTION $t > $OUTFILE 2>&1251 bash $XTRACE_OPTION $t > $OUTFILE 2>&1
259 rc=$?252 rc=$?
260253
254 if [[ -z "$DEBUG" || -n "$force" ]]
255 then
256 kill_leftovers >>$OUTFILE 2>&1
257 clean >>$OUTFILE 2>&1
258 fi
259
261 if [ $rc -eq 0 ]260 if [ $rc -eq 0 ]
262 then261 then
263 echo "[passed]"262 echo "[passed]"
@@ -284,20 +283,12 @@
284 then283 then
285 break;284 break;
286 fi285 fi
287 fi286 fi
288
289 stop_mysqld >/dev/null 2>&1
290 clean >/dev/null 2>&1
291done287done
292288
293echo "========================================================================"289echo "========================================================================"
294echo290echo
295291
296if [ -n "$force" -o $failed_count -eq 0 ]
297then
298 kill_leftovers
299fi
300
301if [ $result -eq 1 ]292if [ $result -eq 1 ]
302then293then
303 echo294 echo
304295
=== modified file 'test/t/bug1002688.sh'
--- test/t/bug1002688.sh 2012-05-22 14:52:54 +0000
+++ test/t/bug1002688.sh 2012-06-12 10:40:23 +0000
@@ -3,8 +3,7 @@
3############################################################################3############################################################################
4. inc/common.sh4. inc/common.sh
55
6init6start_server --innodb_file_per_table
7run_mysqld --innodb_file_per_table
8load_sakila7load_sakila
98
10# Full backup9# Full backup
@@ -44,7 +43,7 @@
44vlog "Data prepared for restore"43vlog "Data prepared for restore"
4544
46# Destroying mysql data45# Destroying mysql data
47stop_mysqld46stop_server
48rm -rf $mysql_datadir/*47rm -rf $mysql_datadir/*
49vlog "Data destroyed"48vlog "Data destroyed"
5049
@@ -53,7 +52,7 @@
53innobackupex --copy-back $full_backup_dir52innobackupex --copy-back $full_backup_dir
54vlog "Data restored"53vlog "Data restored"
5554
56run_mysqld --innodb_file_per_table55start_server --innodb_file_per_table
5756
58vlog "Checking checksums"57vlog "Checking checksums"
59checksum_b=`checksum_table newdb actor_copy`58checksum_b=`checksum_table newdb actor_copy`
6059
=== modified file 'test/t/bug483827.sh'
--- test/t/bug483827.sh 2012-05-18 11:19:17 +0000
+++ test/t/bug483827.sh 2012-06-12 10:40:23 +0000
@@ -10,12 +10,9 @@
1010
11. inc/common.sh11. inc/common.sh
1212
13init13start_server
14mv ${mysql_datadir} ${mysql_datadir}1
15run_mysqld --datadir=${mysql_datadir}1
1614
17backup_dir=$topdir/backup15backup_dir=$topdir/backup
18rm -rf $backup_dir
1916
20# change defaults file from my.cnf to my_multi.cnf17# change defaults file from my.cnf to my_multi.cnf
21modify_args18modify_args
@@ -23,23 +20,23 @@
23# make my_multi.cnf20# make my_multi.cnf
24echo "21echo "
25[mysqld1]22[mysqld1]
26datadir=${mysql_datadir}123datadir=${mysql_datadir}
27tmpdir=$mysql_tmpdir" > $topdir/my_multi.cnf24tmpdir=$mysql_tmpdir" > $topdir/my_multi.cnf
2825
29# Backup26# Backup
30innobackupex --no-timestamp --defaults-group=mysqld1 $backup_dir27innobackupex --no-timestamp --defaults-group=mysqld1 $backup_dir
31innobackupex --apply-log $backup_dir28innobackupex --apply-log $backup_dir
3229
33stop_mysqld30stop_server
3431
35# clean datadir32# clean datadir
36rm -rf ${mysql_datadir}1/*33rm -rf ${mysql_datadir}/*
3734
38# restore backup35# restore backup
39innobackupex --copy-back --defaults-group=mysqld1 $backup_dir36innobackupex --copy-back --defaults-group=mysqld1 $backup_dir
4037
41# make sure that data are in correct place38# make sure that data are in correct place
42if [ ! -f ${mysql_datadir}1/ibdata1 ] ; then39if [ ! -f ${mysql_datadir}/ibdata1 ] ; then
43 vlog "Data not found in ${mysql_datadir}1"40 vlog "Data not found in ${mysql_datadir}"
44 exit -141 exit -1
45fi42fi
4643
=== modified file 'test/t/bug489290.sh'
--- test/t/bug489290.sh 2012-02-13 12:07:03 +0000
+++ test/t/bug489290.sh 2012-06-12 10:40:23 +0000
@@ -4,8 +4,7 @@
44
5. inc/common.sh5. inc/common.sh
66
7init7start_server
8run_mysqld
98
10backup_dir=$topdir/backup9backup_dir=$topdir/backup
11mkdir -p $backup_dir10mkdir -p $backup_dir
1211
=== modified file 'test/t/bug514068.sh'
--- test/t/bug514068.sh 2012-02-10 20:05:56 +0000
+++ test/t/bug514068.sh 2012-06-12 10:40:23 +0000
@@ -5,12 +5,11 @@
55
6. inc/common.sh6. inc/common.sh
77
8init8start_server
9run_mysqld
109
11innobackupex --no-timestamp $topdir/backup >$topdir/stdout 2>$topdir/stderr10innobackupex --no-timestamp $topdir/backup >$topdir/stdout 2>$topdir/stderr
1211
13stop_mysqld12stop_server
14# Remove datadir13# Remove datadir
15rm -r $mysql_datadir14rm -r $mysql_datadir
1615
1716
=== modified file 'test/t/bug606981.sh'
--- test/t/bug606981.sh 2012-02-10 20:05:56 +0000
+++ test/t/bug606981.sh 2012-06-12 10:40:23 +0000
@@ -6,15 +6,15 @@
6 exit $SKIPPED_EXIT_CODE6 exit $SKIPPED_EXIT_CODE
7fi7fi
88
9init9start_server --innodb_file_per_table
10run_mysqld10
11load_sakila11load_sakila
1212
13# Take backup13# Take backup
14echo "innodb_flush_method=O_DIRECT" >> $topdir/my.cnf14echo "innodb_flush_method=O_DIRECT" >> $topdir/my.cnf
15mkdir -p $topdir/backup15mkdir -p $topdir/backup
16innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar16innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar
17stop_mysqld17stop_server
1818
19# See if xtrabackup was using O_DIRECT19# See if xtrabackup was using O_DIRECT
20if ! grep "xtrabackup: using O_DIRECT" $OUTFILE ;20if ! grep "xtrabackup: using O_DIRECT" $OUTFILE ;
@@ -36,6 +36,6 @@
36mkdir -p $mysql_datadir36mkdir -p $mysql_datadir
37innobackupex --copy-back --defaults-file=$topdir/my.cnf $backup_dir37innobackupex --copy-back --defaults-file=$topdir/my.cnf $backup_dir
3838
39run_mysqld39start_server
40# Check sakila40# Check sakila
41${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila41${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila
4242
=== modified file 'test/t/bug722638.sh'
--- test/t/bug722638.sh 2011-09-14 15:32:21 +0000
+++ test/t/bug722638.sh 2012-06-12 10:40:23 +0000
@@ -3,15 +3,14 @@
3# created breaks backup3# created breaks backup
4########################################################################4########################################################################
55
6if ! `$XB_BIN --help | grep debug-sync > /dev/null`; then6. inc/common.sh
7
8if ! $XB_BIN --help 2>&1 | grep -q debug-sync; then
7 echo "Requires --debug-sync support" > $SKIPPED_REASON9 echo "Requires --debug-sync support" > $SKIPPED_REASON
8 exit $SKIPPED_EXIT_CODE10 exit $SKIPPED_EXIT_CODE
9fi11fi
1012
11. inc/common.sh13start_server --innodb_file_per_table
12
13init
14run_mysqld --innodb_file_per_table
1514
16run_cmd $MYSQL $MYSQL_ARGS test <<EOF15run_cmd $MYSQL $MYSQL_ARGS test <<EOF
1716
@@ -88,14 +87,14 @@
88# Prepare87# Prepare
89xtrabackup --datadir=$mysql_datadir --prepare --target-dir=$topdir/backup88xtrabackup --datadir=$mysql_datadir --prepare --target-dir=$topdir/backup
9089
91stop_mysqld90stop_server
9291
93# Restore92# Restore
94rm -rf $mysql_datadir/ibdata1 $mysql_datadir/ib_logfile* \93rm -rf $mysql_datadir/ibdata1 $mysql_datadir/ib_logfile* \
95 $mysql_datadir/test/*.ibd94 $mysql_datadir/test/*.ibd
96cp -r $topdir/backup/* $mysql_datadir95cp -r $topdir/backup/* $mysql_datadir
9796
98run_mysqld --innodb_file_per_table97start_server --innodb_file_per_table
9998
100# Verify checksums99# Verify checksums
101checksum_t1_new=`checksum_table test t1`100checksum_t1_new=`checksum_table test t1`
102101
=== modified file 'test/t/bug723097.sh'
--- test/t/bug723097.sh 2012-02-02 20:35:45 +0000
+++ test/t/bug723097.sh 2012-06-12 10:40:23 +0000
@@ -1,7 +1,6 @@
1. inc/common.sh1. inc/common.sh
22
3init3start_server --innodb_file_per_table
4run_mysqld --innodb_file_per_table
54
6vlog "Loading data from sql file"5vlog "Loading data from sql file"
7run_cmd ${MYSQL} ${MYSQL_ARGS} test < inc/bug723097.sql6run_cmd ${MYSQL} ${MYSQL_ARGS} test < inc/bug723097.sql
@@ -18,12 +17,12 @@
18vlog "Backup is done"17vlog "Backup is done"
19xtrabackup --datadir=$mysql_datadir --prepare --target-dir=$topdir/data/full18xtrabackup --datadir=$mysql_datadir --prepare --target-dir=$topdir/data/full
20vlog "Data prepared fo restore"19vlog "Data prepared fo restore"
21stop_mysqld20stop_server
2221
23cd $topdir/data/full/test22cd $topdir/data/full/test
24cp -r * $mysql_datadir/test23cp -r * $mysql_datadir/test
25cd -24cd -
26run_mysqld --innodb_file_per_table25start_server --innodb_file_per_table
27checksum_b=`checksum_table test messages`26checksum_b=`checksum_table test messages`
28vlog "Checksum after is $checksum_b"27vlog "Checksum after is $checksum_b"
2928
3029
=== modified file 'test/t/bug723318.sh'
--- test/t/bug723318.sh 2011-10-13 17:36:00 +0000
+++ test/t/bug723318.sh 2012-06-12 10:40:23 +0000
@@ -1,7 +1,7 @@
1. inc/common.sh1. inc/common.sh
22
3init3start_server
4run_mysqld4
5load_dbase_schema sakila5load_dbase_schema sakila
6load_dbase_data sakila6load_dbase_data sakila
77
@@ -10,7 +10,8 @@
10mkdir -p $topdir/backup/stream10mkdir -p $topdir/backup/stream
11innobackupex --stream=tar $topdir/backup > $topdir/backup/stream/out.tar 11innobackupex --stream=tar $topdir/backup > $topdir/backup/stream/out.tar
1212
13stop_mysqld13stop_server
14
14cd $topdir/backup/stream/15cd $topdir/backup/stream/
15$TAR -ixvf out.tar16$TAR -ixvf out.tar
1617
1718
=== modified file 'test/t/bug729843.sh'
--- test/t/bug729843.sh 2011-11-25 18:50:56 +0000
+++ test/t/bug729843.sh 2012-06-12 10:40:23 +0000
@@ -4,8 +4,7 @@
44
5. inc/common.sh5. inc/common.sh
66
7init7start_server
8run_mysqld
98
10mkdir $topdir/backup9mkdir $topdir/backup
11logfile=$topdir/backup/innobackupex_log10logfile=$topdir/backup/innobackupex_log
1211
=== modified file 'test/t/bug733651.sh'
--- test/t/bug733651.sh 2012-01-31 11:15:25 +0000
+++ test/t/bug733651.sh 2012-06-12 10:40:23 +0000
@@ -5,14 +5,12 @@
55
6. inc/common.sh6. inc/common.sh
77
8init
9
10options="innodb_log_files_in_group innodb_log_file_size"8options="innodb_log_files_in_group innodb_log_file_size"
11if [ ! -z "$XTRADB_VERSION" ]; then9if [ ! -z "$XTRADB_VERSION" ]; then
12 options="$options innodb_page_size innodb_fast_checksum innodb_log_block_size"10 options="$options innodb_page_size innodb_fast_checksum innodb_log_block_size"
13fi11fi
1412
15run_mysqld13start_server
1614
17mkdir -p $topdir/backup15mkdir -p $topdir/backup
18innobackupex $topdir/backup16innobackupex $topdir/backup
1917
=== modified file 'test/t/bug759225.sh'
--- test/t/bug759225.sh 2012-02-10 20:05:56 +0000
+++ test/t/bug759225.sh 2012-06-12 10:40:23 +0000
@@ -16,15 +16,14 @@
16 exit $SKIPPED_EXIT_CODE16 exit $SKIPPED_EXIT_CODE
17fi17fi
1818
19init19start_server
20run_mysqld
21load_sakila20load_sakila
2221
23# Take backup22# Take backup
24echo "innodb_flush_method=ALL_O_DIRECT" >> $topdir/my.cnf23echo "innodb_flush_method=ALL_O_DIRECT" >> $topdir/my.cnf
25mkdir -p $topdir/backup24mkdir -p $topdir/backup
26innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar25innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar
27stop_mysqld26stop_server
2827
29# See if xtrabackup was using ALL_O_DIRECT28# See if xtrabackup was using ALL_O_DIRECT
30if ! grep "xtrabackup: using ALL_O_DIRECT" $OUTFILE ;29if ! grep "xtrabackup: using ALL_O_DIRECT" $OUTFILE ;
@@ -46,6 +45,6 @@
46mkdir -p $mysql_datadir45mkdir -p $mysql_datadir
47innobackupex --copy-back --defaults-file=$topdir/my.cnf $backup_dir46innobackupex --copy-back --defaults-file=$topdir/my.cnf $backup_dir
4847
49run_mysqld48start_server
50# Check sakila49# Check sakila
51${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila50${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila
5251
=== modified file 'test/t/bug759701.sh'
--- test/t/bug759701.sh 2012-02-02 20:35:45 +0000
+++ test/t/bug759701.sh 2012-06-12 10:40:23 +0000
@@ -4,8 +4,7 @@
4##########################################################################4##########################################################################
5. inc/common.sh5. inc/common.sh
66
7init7start_server --innodb_file_per_table
8run_mysqld --innodb_file_per_table
9load_sakila8load_sakila
109
11# Full backup10# Full backup
@@ -45,7 +44,7 @@
45vlog "Data prepared for restore"44vlog "Data prepared for restore"
4645
47# Destroying mysql data46# Destroying mysql data
48stop_mysqld47stop_server
49rm -rf $mysql_datadir/*48rm -rf $mysql_datadir/*
50vlog "Data destroyed"49vlog "Data destroyed"
5150
@@ -54,7 +53,7 @@
54innobackupex --copy-back $full_backup_dir53innobackupex --copy-back $full_backup_dir
55vlog "Data restored"54vlog "Data restored"
5655
57run_mysqld --innodb_file_per_table56start_server --innodb_file_per_table
5857
59vlog "Checking checksums"58vlog "Checking checksums"
60checksum_b=`checksum_table newdb actor_copy`59checksum_b=`checksum_table newdb actor_copy`
6160
=== modified file 'test/t/bug766033.sh'
--- test/t/bug766033.sh 2012-03-09 05:24:24 +0000
+++ test/t/bug766033.sh 2012-06-12 10:40:23 +0000
@@ -4,25 +4,20 @@
44
5. inc/common.sh5. inc/common.sh
66
7init7start_server --innodb_file_per_table
8run_mysqld --innodb_file_per_table
9load_sakila8load_sakila
109
11stop_mysqld10stop_server
1211
13# Full backup12# Full backup
14vlog "Starting backup"13vlog "Starting backup"
1514
16# corrupt database15# corrupt database
17dd if=/dev/zero of=$mysql_datadir/sakila/rental.ibd seek=1000 count=1638416dd if=/dev/zero of=$mysql_datadir/sakila/rental.ibd seek=1000 count=1
1817
19# we want xtrabackup to be failed on rental.ibd18# we want xtrabackup to be failed on rental.ibd
20set +e19run_cmd_expect_failure $XB_BIN $XB_ARGS --backup --datadir=$mysql_datadir \
21COUNT=`xtrabackup --backup --datadir=$mysql_datadir --target-dir=$topdir/backup 2>&1 \20 --target-dir=$topdir/backup
22 | grep "File ./sakila/rental.ibd seems to be corrupted" | wc -l `21
23set -e22grep -q "File ./sakila/rental.ibd seems to be corrupted" $OUTFILE
2423
25if [ "$COUNT" != "1" ] ; then
26 vlog "test failed"
27 exit 1
28fi
2924
=== modified file 'test/t/bug766607.sh'
--- test/t/bug766607.sh 2011-07-05 04:17:41 +0000
+++ test/t/bug766607.sh 2012-06-12 10:40:23 +0000
@@ -1,7 +1,6 @@
1. inc/common.sh1. inc/common.sh
22
3init3start_server --innodb_file_per_table
4run_mysqld --innodb_file_per_table
5load_dbase_schema incremental_sample4load_dbase_schema incremental_sample
65
7# Full backup dir6# Full backup dir
@@ -18,8 +17,8 @@
18FLUSH LOGS;17FLUSH LOGS;
19EOF18EOF
2019
21stop_mysqld20stop_server
22run_mysqld --innodb_file_per_table21start_server --innodb_file_per_table
2322
24vlog "Making incremental backup"23vlog "Making incremental backup"
25xtrabackup --datadir=$mysql_datadir --backup --target-dir=$topdir/data/delta --incremental-basedir=$topdir/data/full24xtrabackup --datadir=$mysql_datadir --backup --target-dir=$topdir/data/delta --incremental-basedir=$topdir/data/full
@@ -37,7 +36,7 @@
37xtrabackup --datadir=$mysql_datadir --prepare --target-dir=$topdir/data/full36xtrabackup --datadir=$mysql_datadir --prepare --target-dir=$topdir/data/full
38vlog "Data prepared for restore"37vlog "Data prepared for restore"
3938
40stop_mysqld39stop_server
4140
42vlog "Copying files"41vlog "Copying files"
4342
@@ -46,6 +45,6 @@
46cd $topdir45cd $topdir
4746
48vlog "Data restored"47vlog "Data restored"
49run_mysqld --innodb_file_per_table48start_server --innodb_file_per_table
5049
51run_cmd $MYSQL $MYSQL_ARGS -e "SELECT * FROM t" test50run_cmd $MYSQL $MYSQL_ARGS -e "SELECT * FROM t" test
5251
=== modified file 'test/t/bug810269.sh'
--- test/t/bug810269.sh 2011-09-14 17:41:10 +0000
+++ test/t/bug810269.sh 2012-06-12 10:40:23 +0000
@@ -5,14 +5,12 @@
55
6. inc/common.sh6. inc/common.sh
77
8init
9
10if [ -z "$INNODB_VERSION" ]; then8if [ -z "$INNODB_VERSION" ]; then
11 echo "Requires InnoDB plugin or XtraDB" >$SKIPPED_REASON9 echo "Requires InnoDB plugin or XtraDB" >$SKIPPED_REASON
12 exit $SKIPPED_EXIT_CODE10 exit $SKIPPED_EXIT_CODE
13fi11fi
1412
15run_mysqld "--innodb_strict_mode --innodb_file_per_table \13start_server "--innodb_strict_mode --innodb_file_per_table \
16--innodb_file_format=Barracuda"14--innodb_file_format=Barracuda"
1715
18load_dbase_schema incremental_sample16load_dbase_schema incremental_sample
@@ -54,7 +52,7 @@
5452
55innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar53innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar
5654
57stop_mysqld55stop_server
58rm -rf $mysql_datadir56rm -rf $mysql_datadir
5957
60vlog "Applying log"58vlog "Applying log"
@@ -68,7 +66,7 @@
68mkdir -p $mysql_datadir66mkdir -p $mysql_datadir
69innobackupex --copy-back $topdir/backup67innobackupex --copy-back $topdir/backup
7068
71run_mysqld69start_server
7270
73checksum_b=`checksum_table incremental_sample test`71checksum_b=`checksum_table incremental_sample test`
7472
7573
=== modified file 'test/t/bug817132.sh'
--- test/t/bug817132.sh 2012-02-02 20:35:45 +0000
+++ test/t/bug817132.sh 2012-06-12 10:40:23 +0000
@@ -12,8 +12,7 @@
12 exit $SKIPPED_EXIT_CODE12 exit $SKIPPED_EXIT_CODE
13fi13fi
1414
15init15start_server
16run_mysqld
17load_dbase_schema sakila16load_dbase_schema sakila
18load_dbase_data sakila17load_dbase_data sakila
1918
@@ -22,7 +21,7 @@
22backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'`21backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'`
23vlog "Backup created in directory $backup_dir"22vlog "Backup created in directory $backup_dir"
2423
25stop_mysqld24stop_server
26# Remove datadir25# Remove datadir
27rm -r $mysql_datadir26rm -r $mysql_datadir
2827
@@ -37,6 +36,6 @@
37# --ibbackup explicitly (see $IB_ARGS).36# --ibbackup explicitly (see $IB_ARGS).
38run_cmd $IB_BIN --defaults-file=$topdir/my.cnf --user=root --socket=$mysql_socket --copy-back $backup_dir37run_cmd $IB_BIN --defaults-file=$topdir/my.cnf --user=root --socket=$mysql_socket --copy-back $backup_dir
3938
40run_mysqld39start_server
41# Check sakila40# Check sakila
42run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila41run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila
4342
=== modified file 'test/t/bug884737.sh'
--- test/t/bug884737.sh 2011-11-01 16:17:02 +0000
+++ test/t/bug884737.sh 2012-06-12 10:40:23 +0000
@@ -5,8 +5,7 @@
55
6. inc/common.sh6. inc/common.sh
77
8init8start_server
9run_mysqld
109
11# Check that --parallel=<negative value> doesn't blow up10# Check that --parallel=<negative value> doesn't blow up
12vlog "Creating the backup directory: $topdir/backup"11vlog "Creating the backup directory: $topdir/backup"
1312
=== modified file 'test/t/bug891496.sh'
--- test/t/bug891496.sh 2012-02-02 20:35:45 +0000
+++ test/t/bug891496.sh 2012-06-12 10:40:23 +0000
@@ -4,17 +4,14 @@
44
5. inc/common.sh5. inc/common.sh
66
7init
8
9innodb_data_file_path="ibdata1:3M;ibdata2:10M:autoextend"7innodb_data_file_path="ibdata1:3M;ibdata2:10M:autoextend"
108
9start_server --innodb_data_file_path=$innodb_data_file_path
10
11cat >> $topdir/my.cnf <<EOF11cat >> $topdir/my.cnf <<EOF
12innodb_data_file_path=$innodb_data_file_path12innodb_data_file_path=$innodb_data_file_path
13EOF13EOF
1414
15MYSQLD_ARGS="$MYSQLD_ARGS --innodb_data_file_path=$innodb_data_file_path"
16
17run_mysqld
18load_dbase_schema sakila15load_dbase_schema sakila
19load_dbase_data sakila16load_dbase_data sakila
2017
@@ -22,7 +19,7 @@
22mkdir -p $topdir/backup19mkdir -p $topdir/backup
23innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar20innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar
2421
25stop_mysqld22stop_server
26# Remove datadir23# Remove datadir
27rm -r $mysql_datadir24rm -r $mysql_datadir
28# Restore sakila25# Restore sakila
@@ -42,6 +39,6 @@
42vlog "###########"39vlog "###########"
43innobackupex --copy-back $backup_dir40innobackupex --copy-back $backup_dir
4441
45run_mysqld42start_server --innodb_data_file_path=$innodb_data_file_path
46# Check sakila43# Check sakila
47run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila44run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila
4845
=== modified file 'test/t/bug972169.sh'
--- test/t/bug972169.sh 2012-05-15 16:53:07 +0000
+++ test/t/bug972169.sh 2012-06-12 10:40:23 +0000
@@ -4,9 +4,7 @@
44
5. inc/common.sh5. inc/common.sh
66
7init7start_server
8
9run_mysqld
108
11run_cmd_expect_failure $XB_BIN $XB_ARGS --datadir=$mysql_datadir --backup \9run_cmd_expect_failure $XB_BIN $XB_ARGS --datadir=$mysql_datadir --backup \
12 --compress --stream=tar10 --compress --stream=tar
1311
=== added file 'test/t/bug977101.sh'
--- test/t/bug977101.sh 1970-01-01 00:00:00 +0000
+++ test/t/bug977101.sh 2012-06-12 10:40:23 +0000
@@ -0,0 +1,31 @@
1########################################################################
2# Bug #977101: --safe-slave-backup results in incorrect binlog info
3########################################################################
4
5. inc/common.sh
6
7master_id=1
8slave_id=2
9
10start_server_with_id $master_id
11start_server_with_id $slave_id
12
13setup_slave $slave_id $master_id
14
15# Full backup of the slave server
16switch_server $slave_id
17
18# Check that binlog info is correct with --safe-slave-backup
19innobackupex --no-timestamp --safe-slave-backup $topdir/backup
20egrep -q '^mysql-bin.000001[[:space:]]+[0-9]+[[:space:]]+$' \
21 $topdir/backup/xtrabackup_binlog_info
22
23# Check that both binlog info and slave info are correct with
24# --safe-slave-backup
25rm -rf $topdir/backup
26innobackupex --no-timestamp --slave-info --safe-slave-backup $topdir/backup
27egrep -q '^mysql-bin.000001[[:space:]]+[0-9]+[[:space:]]+$' \
28 $topdir/backup/xtrabackup_binlog_info
29egrep -q '^CHANGE MASTER TO MASTER_LOG_FILE='\''mysql-bin.000001'\'', MASTER_LOG_POS=[0-9]+$' \
30 $topdir/backup/xtrabackup_slave_info
31
032
=== modified file 'test/t/bug983685.sh'
--- test/t/bug983685.sh 2012-05-21 07:54:00 +0000
+++ test/t/bug983685.sh 2012-06-12 10:40:23 +0000
@@ -4,12 +4,10 @@
44
5. inc/common.sh5. inc/common.sh
66
7init7start_server
88
9options="innodb_data_file_path"9options="innodb_data_file_path"
1010
11run_mysqld
12
13mkdir -p $topdir/backup11mkdir -p $topdir/backup
14innobackupex $topdir/backup12innobackupex $topdir/backup
15backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'`13backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'`
1614
=== modified file 'test/t/bug983720_galerainfo.sh'
--- test/t/bug983720_galerainfo.sh 2012-04-20 06:59:15 +0000
+++ test/t/bug983720_galerainfo.sh 2012-06-12 10:40:23 +0000
@@ -16,8 +16,7 @@
16fi16fi
17set -e17set -e
1818
19init19start_server --log-bin=`hostname`-bin --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/libgalera_smm.so --wsrep_cluster_address=gcomm://
20run_mysqld --log-bin=`hostname`-bin --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/libgalera_smm.so --wsrep_cluster_address=gcomm://
2120
22# take a backup with stream mode21# take a backup with stream mode
23mkdir -p $topdir/backup22mkdir -p $topdir/backup
2423
=== modified file 'test/t/bug983720_lrudump.sh'
--- test/t/bug983720_lrudump.sh 2012-04-20 06:59:15 +0000
+++ test/t/bug983720_lrudump.sh 2012-06-12 10:40:23 +0000
@@ -9,8 +9,7 @@
9 exit $SKIPPED_EXIT_CODE9 exit $SKIPPED_EXIT_CODE
10fi10fi
1111
12init12start_server
13run_mysqld
1413
15# produce ib_lru_dump14# produce ib_lru_dump
16${MYSQL} ${MYSQL_ARGS} -e "select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_LRU_DUMP*/;"15${MYSQL} ${MYSQL_ARGS} -e "select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_LRU_DUMP*/;"
1716
=== modified file 'test/t/bug989397.sh'
--- test/t/bug989397.sh 2012-05-17 13:34:43 +0000
+++ test/t/bug989397.sh 2012-06-12 10:40:23 +0000
@@ -5,8 +5,7 @@
55
6. inc/common.sh6. inc/common.sh
77
8init8start_server --innodb_file_per_table
9run_mysqld --innodb_file_per_table
109
11# create table which name ends with opt10# create table which name ends with opt
12${MYSQL} ${MYSQL_ARGS} -e "create table test.topt (a int auto_increment primary key);"11${MYSQL} ${MYSQL_ARGS} -e "create table test.topt (a int auto_increment primary key);"
1312
=== modified file 'test/t/bug996493.sh'
--- test/t/bug996493.sh 2012-05-18 05:36:49 +0000
+++ test/t/bug996493.sh 2012-06-12 10:40:23 +0000
@@ -5,16 +5,14 @@
55
6. inc/common.sh6. inc/common.sh
77
8init8start_server
9
10run_mysqld
119
12backup_dir=$topdir/backup10backup_dir=$topdir/backup
13innobackupex --no-timestamp $backup_dir11innobackupex --no-timestamp $backup_dir
14vlog "Backup created in directory $backup_dir"12vlog "Backup created in directory $backup_dir"
1513
16vlog "Stop mysqld"14vlog "Stop mysqld"
17stop_mysqld15stop_server
1816
19vlog "Remove datadir"17vlog "Remove datadir"
20rm -r $mysql_datadir/*18rm -r $mysql_datadir/*
2119
=== modified file 'test/t/bug999750.sh'
--- test/t/bug999750.sh 2012-05-15 16:53:07 +0000
+++ test/t/bug999750.sh 2012-06-12 10:40:23 +0000
@@ -4,8 +4,6 @@
44
5. inc/common.sh5. inc/common.sh
66
7init
8
9# Exclude the built-in InnoDB configuration as it requires a different format7# Exclude the built-in InnoDB configuration as it requires a different format
10# for --incremental-lsn.8# for --incremental-lsn.
11if [ -z "$INNODB_VERSION" ]; then9if [ -z "$INNODB_VERSION" ]; then
@@ -13,7 +11,7 @@
13 exit $SKIPPED_EXIT_CODE11 exit $SKIPPED_EXIT_CODE
14fi12fi
1513
16run_mysqld14start_server
1715
18run_cmd_expect_failure $XB_BIN $XB_ARGS --datadir=$mysql_datadir --backup \16run_cmd_expect_failure $XB_BIN $XB_ARGS --datadir=$mysql_datadir --backup \
19 --incremental-lsn=0 --stream=tar17 --incremental-lsn=0 --stream=tar
2018
=== modified file 'test/t/ib_binlog_info.sh'
--- test/t/ib_binlog_info.sh 2012-02-06 10:10:40 +0000
+++ test/t/ib_binlog_info.sh 2012-06-12 10:40:23 +0000
@@ -4,8 +4,7 @@
44
5. inc/common.sh5. inc/common.sh
66
7init7start_server
8run_mysqld
9load_sakila8load_sakila
109
11innobackupex --no-timestamp $topdir/backup10innobackupex --no-timestamp $topdir/backup
1211
=== modified file 'test/t/ib_csm_csv.sh'
--- test/t/ib_csm_csv.sh 2012-02-02 20:35:45 +0000
+++ test/t/ib_csm_csv.sh 2012-06-12 10:40:23 +0000
@@ -1,7 +1,6 @@
1. inc/common.sh1. inc/common.sh
22
3init3start_server --innodb_file_per_table
4run_mysqld --innodb_file_per_table
5run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create database csv"4run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create database csv"
6run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create table csm (a int NOT NULL ) ENGINE=CSV" csv5run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create table csm (a int NOT NULL ) ENGINE=CSV" csv
7# Adding initial rows6# Adding initial rows
@@ -37,7 +36,7 @@
37vlog "Data prepared for restore"36vlog "Data prepared for restore"
3837
39# Destroying mysql data38# Destroying mysql data
40stop_mysqld39stop_server
41rm -rf $mysql_datadir/*40rm -rf $mysql_datadir/*
42vlog "Data destroyed"41vlog "Data destroyed"
4342
@@ -49,7 +48,7 @@
49innobackupex --copy-back $full_backup_dir48innobackupex --copy-back $full_backup_dir
50vlog "Data restored"49vlog "Data restored"
5150
52run_mysqld --innodb_file_per_table51start_server --innodb_file_per_table
53checksum_b=`checksum_table csv csm`52checksum_b=`checksum_table csv csm`
54vlog "Checking checksums: $checksum_a/$checksum_b"53vlog "Checking checksums: $checksum_a/$checksum_b"
5554
5655
=== modified file 'test/t/ib_empty_dir.sh'
--- test/t/ib_empty_dir.sh 2011-11-28 09:26:22 +0000
+++ test/t/ib_empty_dir.sh 2012-06-12 10:40:23 +0000
@@ -1,14 +1,13 @@
1# Test for bug https://bugs.launchpad.net/percona-xtrabackup/+bug/7375691# Test for bug https://bugs.launchpad.net/percona-xtrabackup/+bug/737569
2. inc/common.sh2. inc/common.sh
33
4init4start_server
5run_mysqld
65
7innobackupex --no-timestamp $topdir/backup6innobackupex --no-timestamp $topdir/backup
8backup_dir=$topdir/backup7backup_dir=$topdir/backup
9vlog "Backup created in directory $backup_dir"8vlog "Backup created in directory $backup_dir"
109
11stop_mysqld10stop_server
12# Remove datadir11# Remove datadir
13rm -r $mysql_datadir12rm -r $mysql_datadir
14# Restore backup13# Restore backup
1514
=== modified file 'test/t/ib_incremental.sh'
--- test/t/ib_incremental.sh 2012-02-02 20:35:45 +0000
+++ test/t/ib_incremental.sh 2012-06-12 10:40:23 +0000
@@ -1,7 +1,6 @@
1. inc/common.sh1. inc/common.sh
22
3init3start_server --innodb_file_per_table
4run_mysqld --innodb_file_per_table
5load_dbase_schema incremental_sample4load_dbase_schema incremental_sample
65
7# Adding initial rows6# Adding initial rows
@@ -72,7 +71,7 @@
72vlog "Data prepared for restore"71vlog "Data prepared for restore"
7372
74# Destroying mysql data73# Destroying mysql data
75stop_mysqld74stop_server
76rm -rf $mysql_datadir/*75rm -rf $mysql_datadir/*
77vlog "Data destroyed"76vlog "Data destroyed"
7877
@@ -84,7 +83,7 @@
84innobackupex --copy-back $full_backup_dir83innobackupex --copy-back $full_backup_dir
85vlog "Data restored"84vlog "Data restored"
8685
87run_mysqld --innodb_file_per_table86start_server --innodb_file_per_table
8887
89vlog "Checking checksums"88vlog "Checking checksums"
90checksum_b=`checksum_table incremental_sample test`89checksum_b=`checksum_table incremental_sample test`
9190
=== modified file 'test/t/ib_lru_dump_basic.sh'
--- test/t/ib_lru_dump_basic.sh 2012-02-06 10:53:43 +0000
+++ test/t/ib_lru_dump_basic.sh 2012-06-12 10:40:23 +0000
@@ -9,8 +9,7 @@
9 exit $SKIPPED_EXIT_CODE9 exit $SKIPPED_EXIT_CODE
10fi10fi
1111
12init12start_server
13run_mysqld
1413
15# produce ib_lru_dump14# produce ib_lru_dump
16${MYSQL} ${MYSQL_ARGS} -e "select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_LRU_DUMP*/;"15${MYSQL} ${MYSQL_ARGS} -e "select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_LRU_DUMP*/;"
1716
=== modified file 'test/t/ib_lru_dump_rsync.sh'
--- test/t/ib_lru_dump_rsync.sh 2012-02-06 10:53:43 +0000
+++ test/t/ib_lru_dump_rsync.sh 2012-06-12 10:40:23 +0000
@@ -14,8 +14,7 @@
14 exit $SKIPPED_EXIT_CODE14 exit $SKIPPED_EXIT_CODE
15fi15fi
1616
17init17start_server
18run_mysqld
1918
20# produce ib_lru_dump19# produce ib_lru_dump
21${MYSQL} ${MYSQL_ARGS} -e "select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_LRU_DUMP*/;"20${MYSQL} ${MYSQL_ARGS} -e "select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_LRU_DUMP*/;"
2221
=== modified file 'test/t/ib_lru_dump_stream.sh'
--- test/t/ib_lru_dump_stream.sh 2012-02-06 10:53:43 +0000
+++ test/t/ib_lru_dump_stream.sh 2012-06-12 10:40:23 +0000
@@ -9,8 +9,7 @@
9 exit $SKIPPED_EXIT_CODE9 exit $SKIPPED_EXIT_CODE
10fi10fi
1111
12init12start_server
13run_mysqld
1413
15# produce ib_lru_dump14# produce ib_lru_dump
16${MYSQL} ${MYSQL_ARGS} -e "select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_LRU_DUMP*/;"15${MYSQL} ${MYSQL_ARGS} -e "select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_LRU_DUMP*/;"
1716
=== modified file 'test/t/ib_rsync.sh'
--- test/t/ib_rsync.sh 2011-11-15 13:01:05 +0000
+++ test/t/ib_rsync.sh 2012-06-12 10:40:23 +0000
@@ -6,13 +6,12 @@
6 exit $SKIPPED_EXIT_CODE6 exit $SKIPPED_EXIT_CODE
7fi7fi
88
9init9start_server --innodb_file_per_table
10run_mysqld --innodb_file_per_table
11load_sakila10load_sakila
1211
13innobackupex --rsync --no-timestamp $topdir/backup12innobackupex --rsync --no-timestamp $topdir/backup
1413
15stop_mysqld14stop_server
1615
17run_cmd rm -r $mysql_datadir16run_cmd rm -r $mysql_datadir
1817
@@ -22,5 +21,5 @@
2221
23innobackupex --copy-back $topdir/backup22innobackupex --copy-back $topdir/backup
2423
25run_mysqld24start_server
26run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT COUNT(*) FROM actor" sakila25run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT COUNT(*) FROM actor" sakila
2726
=== modified file 'test/t/ib_slave_info.sh'
--- test/t/ib_slave_info.sh 2011-08-29 19:54:47 +0000
+++ test/t/ib_slave_info.sh 2012-06-12 10:40:23 +0000
@@ -1,7 +1,14 @@
1. inc/common.sh1. inc/common.sh
22
3init3master_id=1
4run_mysqld --innodb_file_per_table4slave_id=2
5
6start_server_with_id $master_id
7start_server_with_id $slave_id
8
9setup_slave $slave_id $master_id
10
11switch_server $master_id
5load_dbase_schema incremental_sample12load_dbase_schema incremental_sample
613
7# Adding initial rows14# Adding initial rows
@@ -15,11 +22,15 @@
15done22done
16vlog "Initial rows added"23vlog "Initial rows added"
1724
18# Full backup25# Full backup of the slave server
19# backup root directory26switch_server $slave_id
20mkdir -p $topdir/backup
2127
22vlog "Check that --slave-info with --no-lock and no --safe-slave-backup fails"28vlog "Check that --slave-info with --no-lock and no --safe-slave-backup fails"
23run_cmd_expect_failure $IB_BIN $IB_ARGS --slave-info --no-lock $topdir/backup29run_cmd_expect_failure $IB_BIN $IB_ARGS --no-timestamp --slave-info --no-lock \
30 $topdir/backup
2431
25# TODO: add positive tests when the test suite is able to setup replication32innobackupex --no-timestamp --slave-info $topdir/backup
33egrep -q '^mysql-bin.000001[[:space:]]+[0-9]+[[:space:]]+$' \
34 $topdir/backup/xtrabackup_binlog_info
35egrep -q '^CHANGE MASTER TO MASTER_LOG_FILE='\''mysql-bin.000001'\'', MASTER_LOG_POS=[0-9]+$' \
36 $topdir/backup/xtrabackup_slave_info
2637
=== modified file 'test/t/ib_specialchar.sh'
--- test/t/ib_specialchar.sh 2012-02-02 20:35:45 +0000
+++ test/t/ib_specialchar.sh 2012-06-12 10:40:23 +0000
@@ -1,7 +1,7 @@
1. inc/common.sh1. inc/common.sh
22
3init3start_server
4run_mysqld4
5load_dbase_schema sakila5load_dbase_schema sakila
6load_dbase_data sakila6load_dbase_data sakila
77
@@ -20,7 +20,7 @@
20run_cmd ${MYSQLADMIN} ${MYSQL_ARGS} -p'$PASSWD' password ''20run_cmd ${MYSQLADMIN} ${MYSQL_ARGS} -p'$PASSWD' password ''
2121
22vlog "Stopping database server"22vlog "Stopping database server"
23stop_mysqld 23stop_server
24# Remove datadir24# Remove datadir
25vlog "Removing data folder"25vlog "Removing data folder"
26rm -r $mysql_datadir26rm -r $mysql_datadir
@@ -40,7 +40,7 @@
4040
41vlog "Starting database server"41vlog "Starting database server"
42# using --skip-grant-tables to override root password restored from backup42# using --skip-grant-tables to override root password restored from backup
43run_mysqld --skip-grant-tables43start_server --skip-grant-tables
44vlog "Database server started"44vlog "Database server started"
45# Check sakila45# Check sakila
46run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila 46run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila
4747
=== modified file 'test/t/ib_stream_incremental.sh'
--- test/t/ib_stream_incremental.sh 2012-05-15 16:53:07 +0000
+++ test/t/ib_stream_incremental.sh 2012-06-12 10:40:23 +0000
@@ -18,8 +18,7 @@
18 vlog "Testing a streaming incremental backup with the '$stream_format' format"18 vlog "Testing a streaming incremental backup with the '$stream_format' format"
19 vlog "************************************************************************"19 vlog "************************************************************************"
2020
21 init21 start_server
22 run_mysqld --innodb_file_per_table
23 load_dbase_schema incremental_sample22 load_dbase_schema incremental_sample
2423
25# Adding initial rows24# Adding initial rows
@@ -79,7 +78,7 @@
79 vlog "Data prepared for restore"78 vlog "Data prepared for restore"
8079
81# Destroying mysql data80# Destroying mysql data
82 stop_mysqld81 stop_server
83 rm -rf $mysql_datadir/*82 rm -rf $mysql_datadir/*
84 vlog "Data destroyed"83 vlog "Data destroyed"
8584
@@ -88,7 +87,7 @@
88 innobackupex --copy-back $full_backup_dir87 innobackupex --copy-back $full_backup_dir
89 vlog "Data restored"88 vlog "Data restored"
9089
91 run_mysqld --innodb_file_per_table90 start_server --innodb_file_per_table
9291
93 vlog "Checking checksums"92 vlog "Checking checksums"
94 checksum_b=`checksum_table incremental_sample test`93 checksum_b=`checksum_table incremental_sample test`
9594
=== modified file 'test/t/tar4ibd_symlink.sh'
--- test/t/tar4ibd_symlink.sh 2012-02-10 20:05:56 +0000
+++ test/t/tar4ibd_symlink.sh 2012-06-12 10:40:23 +0000
@@ -4,37 +4,41 @@
44
5. inc/common.sh5. inc/common.sh
66
7init7start_server --innodb_file_per_table
8run_mysqld --innodb_file_per_table8
9load_dbase_schema sakila9load_dbase_schema sakila
10load_dbase_data sakila10load_dbase_data sakila
1111
12# Force a checkpoint
13stop_server
14start_server
15
12# Copy some .ibd files to a temporary location and replace them with symlinks16# Copy some .ibd files to a temporary location and replace them with symlinks
1317
14mv $topdir/mysql/sakila/actor.ibd $topdir18mv $MYSQLD_DATADIR/sakila/actor.ibd $MYSQLD_VARDIR/
15ln -s $topdir/actor.ibd $topdir/mysql/sakila19ln -s $MYSQLD_VARDIR/actor.ibd $MYSQLD_DATADIR/sakila/actor.ibd
1620
17mv $topdir/mysql/sakila/customer.ibd $topdir21mv $MYSQLD_DATADIR/sakila/customer.ibd $MYSQLD_VARDIR/customer.ibd
18ln -s $topdir/customer.ibd $topdir/customer_link.ibd22ln -s $MYSQLD_VARDIR/customer.ibd $MYSQLD_VARDIR/customer_link.ibd
19ln -s $topdir/customer_link.ibd $topdir/mysql/sakila/customer.ibd23ln -s $MYSQLD_VARDIR/customer_link.ibd $MYSQLD_DATADIR/sakila/customer.ibd
2024
21# Take backup25# Take backup
22mkdir -p $topdir/backup26mkdir -p $MYSQLD_VARDIR/backup
23innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar27innobackupex --stream=tar $MYSQLD_VARDIR/backup > $MYSQLD_VARDIR/backup/out.tar
2428
25stop_mysqld29stop_server
2630
27# Remove datadir31# Remove datadir
28rm -r $mysql_datadir32rm -r $mysql_datadir
2933
30# Remove the temporary files referenced by symlinks34# Remove the temporary files referenced by symlinks
31rm -f $topdir/actor.ibd35rm -f $MYSQLD_VARDIR/actor.ibd
32rm -f $topdir/customer.ibd36rm -f $MYSQLD_VARDIR/customer.ibd
33rm -f $topdir/customer_link.ibd37rm -f $MYSQLD_VARDIR/customer_link.ibd
3438
35# Restore sakila39# Restore sakila
36vlog "Applying log"40vlog "Applying log"
37backup_dir=$topdir/backup41backup_dir=$MYSQLD_VARDIR/backup
38cd $backup_dir42cd $backup_dir
39run_cmd $TAR -ixvf out.tar43run_cmd $TAR -ixvf out.tar
40cd - >/dev/null 2>&1 44cd - >/dev/null 2>&1
@@ -46,7 +50,7 @@
4650
47innobackupex --copy-back $backup_dir51innobackupex --copy-back $backup_dir
4852
49run_mysqld53start_server
5054
51# Check sakila55# Check sakila
52run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT COUNT(*) FROM actor" sakila56run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT COUNT(*) FROM actor" sakila
5357
=== modified file 'test/t/xb_basic.sh'
--- test/t/xb_basic.sh 2012-02-02 20:35:45 +0000
+++ test/t/xb_basic.sh 2012-06-12 10:40:23 +0000
@@ -1,16 +1,16 @@
1. inc/common.sh1. inc/common.sh
22
3init3start_server
4run_mysqld4
5load_dbase_schema sakila5load_dbase_schema sakila
6load_dbase_data sakila6load_dbase_data sakila
77
8mkdir -p $topdir/backup8mkdir -p $topdir/backup
9innobackupex $topdir/backup9innobackupex $topdir/backup
10backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'`10backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'`
11vlog "Backup created in directory $backup_dir"11vlog "Backup created in directory $backup_dir"
1212
13stop_mysqld13stop_server
14# Remove datadir14# Remove datadir
15rm -r $mysql_datadir15rm -r $mysql_datadir
16#init_mysql_dir16#init_mysql_dir
@@ -27,6 +27,6 @@
27vlog "###########"27vlog "###########"
28innobackupex --copy-back $backup_dir28innobackupex --copy-back $backup_dir
2929
30run_mysqld30start_server
31# Check sakila31# Check sakila
32run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila32run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila
3333
=== modified file 'test/t/xb_defaults_file.sh'
--- test/t/xb_defaults_file.sh 2011-06-21 01:22:59 +0000
+++ test/t/xb_defaults_file.sh 2012-06-12 10:40:23 +0000
@@ -6,8 +6,7 @@
66
7. inc/common.sh7. inc/common.sh
88
9init9start_server
10run_mysqld
1110
12# The following should succeed (can't use xtrabackup directly as it uses11# The following should succeed (can't use xtrabackup directly as it uses
13# --no-defaults)12# --no-defaults)
1413
=== modified file 'test/t/xb_export.sh'
--- test/t/xb_export.sh 2012-02-02 20:35:45 +0000
+++ test/t/xb_export.sh 2012-06-12 10:40:23 +0000
@@ -1,11 +1,5 @@
1. inc/common.sh1. inc/common.sh
22
3init
4
5backup_dir=$topdir/xb_export_backup
6rm -rf $backup_dir
7mkdir $backup_dir
8
9if [ -z "$XTRADB_VERSION" ]; then3if [ -z "$XTRADB_VERSION" ]; then
10 echo "Requires XtraDB" > $SKIPPED_REASON4 echo "Requires XtraDB" > $SKIPPED_REASON
11 exit $SKIPPED_EXIT_CODE5 exit $SKIPPED_EXIT_CODE
@@ -18,11 +12,15 @@
18 import_option="--innodb_expand_import=1"12 import_option="--innodb_expand_import=1"
19fi13fi
2014
21MYSQLD_ARGS="$MYSQLD_ARGS --innodb_file_per_table $import_option \15mysql_extra_args="--innodb_file_per_table $import_option \
22--innodb_file_format=Barracuda"16--innodb_file_format=Barracuda"
2317
24# Starting database server18# Starting database server
25run_mysqld19start_server $mysql_extra_args
20
21backup_dir=$topdir/xb_export_backup
22rm -rf $backup_dir
23mkdir $backup_dir
2624
27# Loading table schema25# Loading table schema
28load_dbase_schema incremental_sample26load_dbase_schema incremental_sample
@@ -48,10 +46,9 @@
48vlog "Table was backed up"46vlog "Table was backed up"
4947
50vlog "Re-initializing database server"48vlog "Re-initializing database server"
51stop_mysqld49stop_server
52# Can't use clean/init because that will remove $backup_dir as well50rm -rf ${MYSQLD_DATADIR}
53clean_datadir51start_server $mysql_extra_args
54run_mysqld
55load_dbase_schema incremental_sample52load_dbase_schema incremental_sample
56vlog "Database was re-initialized"53vlog "Database was re-initialized"
5754
@@ -91,8 +88,8 @@
91# consistent backup results. Otherwise we risk ending up with no test.ibd88# consistent backup results. Otherwise we risk ending up with no test.ibd
92# in the backup in case importing has not finished before taking backup89# in the backup in case importing has not finished before taking backup
9390
94stop_mysqld91stop_server
95run_mysqld92start_server $mysql_extra_args
9693
97# Some testing queries94# Some testing queries
98run_cmd ${MYSQL} ${MYSQL_ARGS} -e "select count(*) from test;" incremental_sample95run_cmd ${MYSQL} ${MYSQL_ARGS} -e "select count(*) from test;" incremental_sample
@@ -111,13 +108,13 @@
111108
112run_cmd ${MYSQL} ${MYSQL_ARGS} -e "delete from test;" incremental_sample109run_cmd ${MYSQL} ${MYSQL_ARGS} -e "delete from test;" incremental_sample
113110
114stop_mysqld111stop_server
115112
116cd $topdir/backup/full113cd $topdir/backup/full
117cp -r * $mysql_datadir114cp -r * $mysql_datadir
118cd -115cd -
119116
120run_mysqld117start_server $mysql_extra_args
121118
122vlog "Cheking checksums"119vlog "Cheking checksums"
123checksum_3=`checksum_table incremental_sample test`120checksum_3=`checksum_table incremental_sample test`
@@ -131,6 +128,6 @@
131128
132vlog "Checksums are OK"129vlog "Checksums are OK"
133130
134stop_mysqld131stop_server
135132
136rm -rf $backup_dir133rm -rf $backup_dir
137134
=== modified file 'test/t/xb_galera_info.sh'
--- test/t/xb_galera_info.sh 2012-02-02 20:13:09 +0000
+++ test/t/xb_galera_info.sh 2012-06-12 10:40:23 +0000
@@ -12,8 +12,7 @@
12fi12fi
13set -e13set -e
1414
15init15start_server --log-bin=`hostname`-bin --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/libgalera_smm.so --wsrep_cluster_address=gcomm://
16run_mysqld --log-bin=`hostname`-bin --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/libgalera_smm.so --wsrep_cluster_address=gcomm://
1716
18innobackupex --no-timestamp --galera-info $topdir/backup 17innobackupex --no-timestamp --galera-info $topdir/backup
19backup_dir=$topdir/backup18backup_dir=$topdir/backup
@@ -26,4 +25,4 @@
26 exit 125 exit 1
27fi26fi
2827
29stop_mysqld28stop_server
3029
=== modified file 'test/t/xb_incremental.sh'
--- test/t/xb_incremental.sh 2012-02-02 20:35:45 +0000
+++ test/t/xb_incremental.sh 2012-06-12 10:40:23 +0000
@@ -1,7 +1,7 @@
1. inc/common.sh1. inc/common.sh
22
3init3start_server --innodb_file_per_table
4run_mysqld --innodb_file_per_table4
5load_dbase_schema incremental_sample5load_dbase_schema incremental_sample
66
7# Adding 10k rows7# Adding 10k rows
@@ -73,14 +73,14 @@
73run_cmd ${MYSQL} ${MYSQL_ARGS} -e "delete from test;" incremental_sample73run_cmd ${MYSQL} ${MYSQL_ARGS} -e "delete from test;" incremental_sample
7474
75# Restore backup75# Restore backup
76stop_mysqld76stop_server
77vlog "Copying files"77vlog "Copying files"
78cd $topdir/data/full/78cd $topdir/data/full/
79cp -r * $mysql_datadir79cp -r * $mysql_datadir
80cd $topdir80cd $topdir
8181
82vlog "Data restored"82vlog "Data restored"
83run_mysqld --innodb_file_per_table83start_server --innodb_file_per_table
8484
85vlog "Checking checksums"85vlog "Checking checksums"
86checksum_b=`checksum_table incremental_sample test`86checksum_b=`checksum_table incremental_sample test`
8787
=== modified file 'test/t/xb_incremental_compressed.sh'
--- test/t/xb_incremental_compressed.sh 2012-02-10 20:05:56 +0000
+++ test/t/xb_incremental_compressed.sh 2012-06-12 10:40:23 +0000
@@ -4,8 +4,6 @@
44
5. inc/common.sh5. inc/common.sh
66
7init
8
9if [ -z "$INNODB_VERSION" ]; then7if [ -z "$INNODB_VERSION" ]; then
10 echo "Requires InnoDB plugin or XtraDB" >$SKIPPED_REASON8 echo "Requires InnoDB plugin or XtraDB" >$SKIPPED_REASON
11 exit $SKIPPED_EXIT_CODE9 exit $SKIPPED_EXIT_CODE
@@ -27,7 +25,7 @@
27 mysqld_additional_args="--innodb_strict_mode --innodb_file_per_table \25 mysqld_additional_args="--innodb_strict_mode --innodb_file_per_table \
28 --innodb_file_format=Barracuda"26 --innodb_file_format=Barracuda"
29 27
30 run_mysqld ${mysqld_additional_args}28 start_server ${mysqld_additional_args}
3129
32 load_dbase_schema incremental_sample30 load_dbase_schema incremental_sample
3331
@@ -134,7 +132,7 @@
134132
135 # Restore backup133 # Restore backup
136134
137 stop_mysqld135 stop_server
138136
139 vlog "Copying files"137 vlog "Copying files"
140138
@@ -144,7 +142,7 @@
144142
145 vlog "Data restored"143 vlog "Data restored"
146144
147 run_mysqld ${mysqld_additional_args}145 start_server ${mysqld_additional_args}
148146
149 vlog "Cheking checksums"147 vlog "Cheking checksums"
150 checksum_b=`checksum_table incremental_sample test`148 checksum_b=`checksum_table incremental_sample test`
@@ -156,10 +154,11 @@
156 fi154 fi
157155
158 vlog "Checksums are OK"156 vlog "Checksums are OK"
157
158 stop_server
159}159}
160160
161for page_size in 1 2 4 8 16; do161for page_size in 1 2 4 8 16; do
162 init
163 test_incremental_compressed ${page_size}162 test_incremental_compressed ${page_size}
164 clean163 clean
165done164done
166165
=== modified file 'test/t/xb_log_overwrap.sh'
--- test/t/xb_log_overwrap.sh 2011-07-04 19:38:26 +0000
+++ test/t/xb_log_overwrap.sh 2012-06-12 10:40:23 +0000
@@ -1,7 +1,7 @@
1. inc/common.sh1. inc/common.sh
22
3init3start_server --innodb_log_file_size=1M --innodb_thread_concurrency=1
4run_mysqld --innodb_log_file_size=1M --innodb_thread_concurrency=14
5load_dbase_schema sakila5load_dbase_schema sakila
6load_dbase_data sakila6load_dbase_data sakila
7mkdir $topdir/backup7mkdir $topdir/backup
88
=== modified file 'test/t/xb_parallel.sh'
--- test/t/xb_parallel.sh 2012-02-02 20:35:45 +0000
+++ test/t/xb_parallel.sh 2012-06-12 10:40:23 +0000
@@ -1,7 +1,7 @@
1. inc/common.sh1. inc/common.sh
22
3init3start_server --innodb_file_per_table
4run_mysqld --innodb_file_per_table4
5load_dbase_schema sakila5load_dbase_schema sakila
6load_dbase_data sakila6load_dbase_data sakila
77
@@ -13,7 +13,7 @@
1313
14#echo "Backup dir in $backup_dir"14#echo "Backup dir in $backup_dir"
1515
16stop_mysqld16stop_server
17# Remove datadir17# Remove datadir
18rm -r $mysql_datadir18rm -r $mysql_datadir
19# Restore sakila19# Restore sakila
@@ -29,6 +29,6 @@
29vlog "###########"29vlog "###########"
30innobackupex --copy-back $backup_dir30innobackupex --copy-back $backup_dir
3131
32run_mysqld32start_server
33# Check sakila33# Check sakila
34run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila34run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila
3535
=== modified file 'test/t/xb_parallel_incremental.sh'
--- test/t/xb_parallel_incremental.sh 2012-02-02 20:35:45 +0000
+++ test/t/xb_parallel_incremental.sh 2012-06-12 10:40:23 +0000
@@ -4,8 +4,8 @@
44
5. inc/common.sh5. inc/common.sh
66
7init7start_server --innodb_file_per_table
8run_mysqld --innodb_file_per_table8
9load_dbase_schema sakila9load_dbase_schema sakila
10load_dbase_data sakila10load_dbase_data sakila
1111
@@ -38,7 +38,7 @@
38innobackupex --incremental --no-timestamp --parallel=8 \38innobackupex --incremental --no-timestamp --parallel=8 \
39 --incremental-basedir=$topdir/full_backup $topdir/inc_backup39 --incremental-basedir=$topdir/full_backup $topdir/inc_backup
4040
41stop_mysqld41stop_server
42# Remove datadir42# Remove datadir
43rm -r $mysql_datadir43rm -r $mysql_datadir
4444
@@ -52,7 +52,7 @@
52mkdir -p $mysql_datadir52mkdir -p $mysql_datadir
53innobackupex --copy-back $topdir/full_backup53innobackupex --copy-back $topdir/full_backup
5454
55run_mysqld55start_server
5656
57# Check sakila57# Check sakila
58run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila58run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila
5959
=== modified file 'test/t/xb_part_range.sh'
--- test/t/xb_part_range.sh 2012-02-02 20:35:45 +0000
+++ test/t/xb_part_range.sh 2012-06-12 10:40:23 +0000
@@ -1,7 +1,6 @@
1. inc/common.sh1. inc/common.sh
22
3init3start_server
4run_mysqld
54
6run_cmd $MYSQL $MYSQL_ARGS test <<EOF5run_cmd $MYSQL $MYSQL_ARGS test <<EOF
7CREATE TABLE test (6CREATE TABLE test (
@@ -89,7 +88,7 @@
8988
90# Restore backup89# Restore backup
9190
92stop_mysqld91stop_server
9392
94vlog "Copying files"93vlog "Copying files"
9594
@@ -99,7 +98,7 @@
9998
100vlog "Data restored"99vlog "Data restored"
101100
102run_mysqld101start_server
103102
104vlog "Cheking checksums"103vlog "Cheking checksums"
105checksum_b=`checksum_table test test`104checksum_b=`checksum_table test test`
106105
=== modified file 'test/t/xb_partial.sh'
--- test/t/xb_partial.sh 2012-02-02 20:35:45 +0000
+++ test/t/xb_partial.sh 2012-06-12 10:40:23 +0000
@@ -1,7 +1,7 @@
1. inc/common.sh1. inc/common.sh
22
3init3start_server --innodb_file_per_table
4run_mysqld --innodb_file_per_table4
5load_dbase_schema incremental_sample5load_dbase_schema incremental_sample
66
7# Adding 10k rows7# Adding 10k rows
@@ -34,13 +34,13 @@
34vlog "Table cleared"34vlog "Table cleared"
3535
36# Restore backup36# Restore backup
37stop_mysqld37stop_server
38vlog "Copying files"38vlog "Copying files"
39cd $topdir/data/parted/39cd $topdir/data/parted/
40cp -r * $mysql_datadir40cp -r * $mysql_datadir
41cd $topdir41cd $topdir
42vlog "Data restored"42vlog "Data restored"
43run_mysqld --innodb_file_per_table43start_server --innodb_file_per_table
44vlog "Checking checksums"44vlog "Checking checksums"
45checksum_b=`checksum_table incremental_sample test`45checksum_b=`checksum_table incremental_sample test`
4646
4747
=== modified file 'test/t/xb_perm_basic.sh'
--- test/t/xb_perm_basic.sh 2012-02-02 20:35:45 +0000
+++ test/t/xb_perm_basic.sh 2012-06-12 10:40:23 +0000
@@ -1,8 +1,7 @@
1# Test for fix of https://bugs.launchpad.net/percona-xtrabackup/+bug/6910901# Test for fix of https://bugs.launchpad.net/percona-xtrabackup/+bug/691090
2. inc/common.sh2. inc/common.sh
33
4init4start_server
5run_mysqld
65
7chmod -R 500 $mysql_datadir6chmod -R 500 $mysql_datadir
8trap "vlog restoring permissions on datadir $mysql_datadir ; \7trap "vlog restoring permissions on datadir $mysql_datadir ; \
98
=== modified file 'test/t/xb_perm_stream.sh'
--- test/t/xb_perm_stream.sh 2012-02-02 20:35:45 +0000
+++ test/t/xb_perm_stream.sh 2012-06-12 10:40:23 +0000
@@ -1,8 +1,7 @@
1# Test for fix of https://bugs.launchpad.net/percona-xtrabackup/+bug/6910901# Test for fix of https://bugs.launchpad.net/percona-xtrabackup/+bug/691090
2. inc/common.sh2. inc/common.sh
33
4init4start_server
5run_mysqld
65
7# Take backup6# Take backup
8chmod -R 500 $mysql_datadir7chmod -R 500 $mysql_datadir
98
=== modified file 'test/t/xb_stats.sh'
--- test/t/xb_stats.sh 2012-02-02 20:35:45 +0000
+++ test/t/xb_stats.sh 2012-06-12 10:40:23 +0000
@@ -1,7 +1,7 @@
1. inc/common.sh1. inc/common.sh
22
3init3start_server
4run_mysqld4
5load_dbase_schema sakila5load_dbase_schema sakila
6load_dbase_data sakila6load_dbase_data sakila
77

Subscribers

People subscribed via source and target branches