Merge lp:~akopytov/percona-xtrabackup/replication-support-in-test-suite-2.0 into lp:percona-xtrabackup/2.0
- replication-support-in-test-suite-2.0
- Merge into 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 | ||||
Related bugs: |
|
||||
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stewart Smith (community) | Approve | ||
Review via email: mp+108772@code.launchpad.net |
Commit message
Description of the change
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
1 | === modified file 'innobackupex' | |||
2 | --- innobackupex 2012-05-23 17:06:52 +0000 | |||
3 | +++ innobackupex 2012-06-12 10:40:23 +0000 | |||
4 | @@ -1207,28 +1207,21 @@ | |||
5 | 1207 | # | 1207 | # |
6 | 1208 | sub write_binlog_info { | 1208 | sub write_binlog_info { |
7 | 1209 | my @lines; | 1209 | my @lines; |
8 | 1210 | my @info_lines = (); | ||
9 | 1211 | my $position = ''; | 1210 | my $position = ''; |
10 | 1212 | my $filename = ''; | 1211 | my $filename = ''; |
11 | 1213 | 1212 | ||
12 | 1214 | # get binlog position | 1213 | # get binlog position |
14 | 1215 | mysql_send "SHOW MASTER STATUS;"; | 1214 | mysql_send 'SHOW MASTER STATUS\G'; |
15 | 1216 | 1215 | ||
17 | 1217 | # get "show master status" output lines (2) from mysql output | 1216 | # get the name of the last binlog file and position in it |
18 | 1217 | # from the SHOW MASTER STATUS output | ||
19 | 1218 | file_to_array($mysql_stdout, \@lines); | 1218 | file_to_array($mysql_stdout, \@lines); |
27 | 1219 | foreach my $line (@lines) { | 1219 | foreach (@lines) { |
28 | 1220 | if ($line =~ m/xtrabackup ping/) { | 1220 | $filename = $1 if /^\s+File:\s(\S+)\s*$/; |
29 | 1221 | # this is a hello message, ignore it | 1221 | $position = $1 if /^\s+Position:\s(\d+)\s*$/; |
23 | 1222 | } else { | ||
24 | 1223 | # this is output line from "show master status" | ||
25 | 1224 | push(@info_lines, $line); | ||
26 | 1225 | } | ||
30 | 1226 | } | 1222 | } |
31 | 1227 | 1223 | ||
32 | 1228 | # write binlog info file | 1224 | # write binlog info file |
33 | 1229 | if (!defined $info_lines[1]) { | ||
34 | 1230 | $info_lines[1] = ""; | ||
35 | 1231 | } | ||
36 | 1232 | if (!$option_remote_host) { | 1225 | if (!$option_remote_host) { |
37 | 1233 | open(FILE, ">$binlog_info") || | 1226 | open(FILE, ">$binlog_info") || |
38 | 1234 | Die "Failed to open file '$binlog_info': $!"; | 1227 | Die "Failed to open file '$binlog_info': $!"; |
39 | @@ -1236,7 +1229,7 @@ | |||
40 | 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'") || |
41 | 1237 | Die "Failed to open file '$option_remote_host:$binlog_info': $!"; | 1230 | Die "Failed to open file '$option_remote_host:$binlog_info': $!"; |
42 | 1238 | } | 1231 | } |
44 | 1239 | print FILE "$info_lines[1]\n"; | 1232 | print FILE "$filename\t$position\t\t\n"; |
45 | 1240 | close(FILE); | 1233 | close(FILE); |
46 | 1241 | 1234 | ||
47 | 1242 | if ($option_stream) { | 1235 | if ($option_stream) { |
48 | @@ -1245,14 +1238,7 @@ | |||
49 | 1245 | unlink $binlog_info || Die "Failed to delete '$binlog_info': $!"; | 1238 | unlink $binlog_info || Die "Failed to delete '$binlog_info': $!"; |
50 | 1246 | } | 1239 | } |
51 | 1247 | 1240 | ||
60 | 1248 | # get the name of the last binlog file and position in it | 1241 | $mysql_binlog_position = "filename '$filename', position $position"; |
53 | 1249 | ($filename, $position) = $info_lines[1] =~ /^\s*([^\s]+)\s+(.*)$/; | ||
54 | 1250 | |||
55 | 1251 | if (defined $filename && defined $position) { | ||
56 | 1252 | $mysql_binlog_position = "filename '$filename', position $position"; | ||
57 | 1253 | } else { | ||
58 | 1254 | $mysql_binlog_position = "filename '', position "; | ||
59 | 1255 | } | ||
61 | 1256 | } | 1242 | } |
62 | 1257 | 1243 | ||
63 | 1258 | # | 1244 | # |
64 | @@ -1314,7 +1300,7 @@ | |||
65 | 1314 | 1300 | ||
66 | 1315 | # get slave status. Use single quotes here, otherwise | 1301 | # get slave status. Use single quotes here, otherwise |
67 | 1316 | # \G is evaluated as a control character. | 1302 | # \G is evaluated as a control character. |
69 | 1317 | mysql_send 'SHOW SLAVE STATUS\G;'; | 1303 | mysql_send 'SHOW SLAVE STATUS\G'; |
70 | 1318 | 1304 | ||
71 | 1319 | # get output of the "show slave status" command from mysql output | 1305 | # get output of the "show slave status" command from mysql output |
72 | 1320 | # and extract binlog position of the master server | 1306 | # and extract binlog position of the master server |
73 | 1321 | 1307 | ||
74 | === removed file 'test/disabled/ib_include.sh' | |||
75 | --- test/disabled/ib_include.sh 2011-03-16 19:41:17 +0000 | |||
76 | +++ test/disabled/ib_include.sh 1970-01-01 00:00:00 +0000 | |||
77 | @@ -1,46 +0,0 @@ | |||
78 | 1 | . inc/common.sh | ||
79 | 2 | |||
80 | 3 | init | ||
81 | 4 | run_mysqld | ||
82 | 5 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create database include;" | ||
83 | 6 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create table t1 (a int) ENGINE=MyISAM;" include | ||
84 | 7 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create table t2 (a int) ENGINE=InnoDB;" include | ||
85 | 8 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "insert into t1 values (1),(2),(3);" include | ||
86 | 9 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "insert into t2 values (1),(2),(3);" include | ||
87 | 10 | # Take backup | ||
88 | 11 | mkdir -p $topdir/backup | ||
89 | 12 | checksum_t1=`${MYSQL} ${MYSQL_ARGS} -Ns -e "checksum table t1" include | awk '{print $2}'` | ||
90 | 13 | checksum_t2=`${MYSQL} ${MYSQL_ARGS} -Ns -e "checksum table t2" include | awk '{print $2}'` | ||
91 | 14 | vlog "checksum_t1 is $checksum_t1" | ||
92 | 15 | vlog "checksum_t2 is $checksum_t2" | ||
93 | 16 | run_cmd ${IB_BIN} --user=root --socket=$mysql_socket --include="^include[.]t" $topdir/backup > $OUTFILE 2>&1 | ||
94 | 17 | backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'` | ||
95 | 18 | stop_mysqld | ||
96 | 19 | # Remove datadir | ||
97 | 20 | rm -r $mysql_datadir | ||
98 | 21 | # Restore data | ||
99 | 22 | vlog "Applying log" | ||
100 | 23 | echo "###########" >> $OUTFILE | ||
101 | 24 | echo "# PREPARE #" >> $OUTFILE | ||
102 | 25 | echo "###########" >> $OUTFILE | ||
103 | 26 | run_cmd ${IB_BIN} --apply-log $backup_dir >> $OUTFILE 2>&1 | ||
104 | 27 | vlog "Restoring MySQL datadir" | ||
105 | 28 | mkdir -p $mysql_datadir | ||
106 | 29 | echo "###########" >> $OUTFILE | ||
107 | 30 | echo "# RESTORE #" >> $OUTFILE | ||
108 | 31 | echo "###########" >> $OUTFILE | ||
109 | 32 | run_cmd ${IB_BIN} --copy-back $backup_dir >> $OUTFILE 2>&1 | ||
110 | 33 | run_mysqld | ||
111 | 34 | checksum_tt1=`${MYSQL} ${MYSQL_ARGS} -Ns -e "checksum table t1" include | awk '{print $2}'` | ||
112 | 35 | checksum_tt2=`${MYSQL} ${MYSQL_ARGS} -Ns -e "checksum table t2" include | awk '{print $2}'` | ||
113 | 36 | vlog "checksum_tt1 is $checksum_tt1" | ||
114 | 37 | vlog "checksum_tt2 is $checksum_tt2" | ||
115 | 38 | if [ (( ($checksum_t2 -eq $checksum_tt2) || ($checksum_t1 -eq $checksum_tt1) )) ] | ||
116 | 39 | then | ||
117 | 40 | vlog "Checksums are OK" | ||
118 | 41 | else | ||
119 | 42 | vlog "Checksums are not equal" | ||
120 | 43 | exit -1 | ||
121 | 44 | fi | ||
122 | 45 | stop_mysqld | ||
123 | 46 | clean | ||
124 | 47 | 0 | ||
125 | === removed file 'test/disabled/tar_compressed.sh' | |||
126 | --- test/disabled/tar_compressed.sh 2011-04-22 02:41:31 +0000 | |||
127 | +++ test/disabled/tar_compressed.sh 1970-01-01 00:00:00 +0000 | |||
128 | @@ -1,110 +0,0 @@ | |||
129 | 1 | ################################################################################ | ||
130 | 2 | # Test of streaming backups with InnoDB compression | ||
131 | 3 | ################################################################################ | ||
132 | 4 | |||
133 | 5 | . inc/common.sh | ||
134 | 6 | |||
135 | 7 | if [ "$MYSQL_VERSION" = "5.0" ]; then | ||
136 | 8 | exit $SKIPPED_EXIT_CODE | ||
137 | 9 | fi | ||
138 | 10 | |||
139 | 11 | function test_incremental_compressed() | ||
140 | 12 | { | ||
141 | 13 | page_size=$1 | ||
142 | 14 | |||
143 | 15 | echo "************************************************************************" | ||
144 | 16 | echo "Testing streaming backup with compressed page size=${page_size}KB " | ||
145 | 17 | echo "************************************************************************" | ||
146 | 18 | |||
147 | 19 | # Use innodb_strict_mode so that failure to use compression results in an | ||
148 | 20 | # error rather than a warning | ||
149 | 21 | if [ "$MYSQL_VERSION" = "5.1" ]; then | ||
150 | 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" | ||
151 | 23 | else | ||
152 | 24 | mysqld_additional_args="--innodb_strict_mode --innodb_file_per_table --innodb_file_format=Barracuda" | ||
153 | 25 | fi | ||
154 | 26 | |||
155 | 27 | run_mysqld ${mysqld_additional_args} | ||
156 | 28 | load_dbase_schema incremental_sample | ||
157 | 29 | |||
158 | 30 | vlog "Compressing the table" | ||
159 | 31 | |||
160 | 32 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e \ | ||
161 | 33 | "ALTER TABLE test ENGINE=InnoDB ROW_FORMAT=compressed KEY_BLOCK_SIZE=$page_size" incremental_sample | ||
162 | 34 | |||
163 | 35 | # Adding 10k rows | ||
164 | 36 | vlog "Adding initial rows to database..." | ||
165 | 37 | numrow=10000 | ||
166 | 38 | count=0 | ||
167 | 39 | while [ "$numrow" -gt "$count" ]; do | ||
168 | 40 | sql="INSERT INTO test VALUES ($count, $numrow)" | ||
169 | 41 | let "count=count+1" | ||
170 | 42 | for ((i=0; $i<99; i++)); do | ||
171 | 43 | sql="${sql},($count, $numrow)" | ||
172 | 44 | let "count=count+1" | ||
173 | 45 | done | ||
174 | 46 | ${MYSQL} ${MYSQL_ARGS} -e "$sql" incremental_sample | ||
175 | 47 | done | ||
176 | 48 | |||
177 | 49 | rows=`${MYSQL} ${MYSQL_ARGS} -Ns -e "SELECT COUNT(*) FROM test" incremental_sample` | ||
178 | 50 | if [ "$rows" != "10000" ]; then | ||
179 | 51 | vlog "Failed to add initial rows" | ||
180 | 52 | exit -1 | ||
181 | 53 | fi | ||
182 | 54 | vlog "Initial rows added" | ||
183 | 55 | |||
184 | 56 | # Create directory for backup files | ||
185 | 57 | rm -rf $topdir/data/full | ||
186 | 58 | mkdir -p $topdir/data/full | ||
187 | 59 | |||
188 | 60 | # Start streaming backuop | ||
189 | 61 | vlog "Starting backup" | ||
190 | 62 | ${IB_BIN} --socket=$mysql_socket --stream=tar $topdir/data/full > $topdir/data/full/out.tar 2>$OUTFILE | ||
191 | 63 | |||
192 | 64 | # Saving the checksum of original table | ||
193 | 65 | checksum_a=`${MYSQL} ${MYSQL_ARGS} -Ns -e "checksum table test;" incremental_sample | awk '{print $2}'` | ||
194 | 66 | vlog "Table checksum is $checksum_a" | ||
195 | 67 | |||
196 | 68 | |||
197 | 69 | # Prepare backup | ||
198 | 70 | vlog "Preparing backup" | ||
199 | 71 | cd $topdir/data/full | ||
200 | 72 | tar -ixf out.tar | ||
201 | 73 | cd - > /dev/null 2>&1 | ||
202 | 74 | run_cmd ${IB_BIN} --apply-log $topdir/data/full >> $OUTFILE 2>&1 | ||
203 | 75 | vlog "Data prepared for restore" | ||
204 | 76 | |||
205 | 77 | # removing rows | ||
206 | 78 | vlog "Table cleared" | ||
207 | 79 | ${MYSQL} ${MYSQL_ARGS} -e "delete from test;" incremental_sample | ||
208 | 80 | |||
209 | 81 | # Restore backup | ||
210 | 82 | stop_mysqld | ||
211 | 83 | vlog "Copying files" | ||
212 | 84 | run_cmd ${IB_BIN} --copy-back $topdir/data/full >> $OUTFILE 2>&1 | ||
213 | 85 | vlog "Data restored" | ||
214 | 86 | |||
215 | 87 | # Comparing checksums | ||
216 | 88 | run_mysqld ${mysqld_additional_args} | ||
217 | 89 | vlog "Cheking checksums" | ||
218 | 90 | checksum_b=`${MYSQL} ${MYSQL_ARGS} -Ns -e "checksum table test;" incremental_sample | awk '{print $2}'` | ||
219 | 91 | |||
220 | 92 | if [ $checksum_a -ne $checksum_b ] | ||
221 | 93 | then | ||
222 | 94 | vlog "Checksums are not equal" | ||
223 | 95 | exit -1 | ||
224 | 96 | fi | ||
225 | 97 | |||
226 | 98 | vlog "Checksums are OK" | ||
227 | 99 | |||
228 | 100 | drop_dbase incremental_sample | ||
229 | 101 | stop_mysqld | ||
230 | 102 | } | ||
231 | 103 | |||
232 | 104 | init | ||
233 | 105 | |||
234 | 106 | for page_size in 1 2 4 8 16; do | ||
235 | 107 | test_incremental_compressed ${page_size} | ||
236 | 108 | done | ||
237 | 109 | |||
238 | 110 | clean | ||
239 | 111 | 0 | ||
240 | === removed file 'test/disabled/xb_lru_dump.sh' | |||
241 | --- test/disabled/xb_lru_dump.sh 2011-03-30 10:30:35 +0000 | |||
242 | +++ test/disabled/xb_lru_dump.sh 1970-01-01 00:00:00 +0000 | |||
243 | @@ -1,20 +0,0 @@ | |||
244 | 1 | . inc/common.sh | ||
245 | 2 | |||
246 | 3 | init | ||
247 | 4 | run_mysqld | ||
248 | 5 | |||
249 | 6 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_LRU_DUMP*/;" | ||
250 | 7 | |||
251 | 8 | mkdir -p $topdir/backup | ||
252 | 9 | run_cmd ${XB_BIN} --datadir=$mysql_datadir --backup --target-dir=$topdir/backup | ||
253 | 10 | |||
254 | 11 | stop_mysqld | ||
255 | 12 | |||
256 | 13 | if [ -f $topdir/backup/ib_lru_dump ] | ||
257 | 14 | then | ||
258 | 15 | vlog "LRU dump has been backuped" | ||
259 | 16 | clean | ||
260 | 17 | else | ||
261 | 18 | vlog "LRU dump was not backuped" | ||
262 | 19 | exit -1 | ||
263 | 20 | fi | ||
264 | 21 | 0 | ||
265 | === modified file 'test/experimental/bug408803.sh' | |||
266 | --- test/experimental/bug408803.sh 2011-06-09 18:34:00 +0000 | |||
267 | +++ test/experimental/bug408803.sh 2012-06-12 10:40:23 +0000 | |||
268 | @@ -1,7 +1,6 @@ | |||
269 | 1 | . inc/common.sh | 1 | . inc/common.sh |
270 | 2 | 2 | ||
273 | 3 | init | 3 | start_server --interactive_timeout=1 --wait_timeout=1 |
272 | 4 | run_mysqld --interactive_timeout=1 --wait_timeout=1 | ||
274 | 5 | load_dbase_schema sakila | 4 | load_dbase_schema sakila |
275 | 6 | load_dbase_data sakila | 5 | load_dbase_data sakila |
276 | 7 | 6 | ||
277 | @@ -11,7 +10,7 @@ | |||
278 | 11 | backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'` | 10 | backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'` |
279 | 12 | vlog "Backup dir in $backup_dir" | 11 | vlog "Backup dir in $backup_dir" |
280 | 13 | 12 | ||
282 | 14 | stop_mysqld | 13 | stop_server |
283 | 15 | # Remove datadir | 14 | # Remove datadir |
284 | 16 | rm -r $mysql_datadir | 15 | rm -r $mysql_datadir |
285 | 17 | # Restore sakila | 16 | # Restore sakila |
286 | @@ -28,6 +27,6 @@ | |||
287 | 28 | echo "###########" >> $OUTFILE | 27 | echo "###########" >> $OUTFILE |
288 | 29 | innobackupex --copy-back $full_backup_dir >> $OUTFILE 2>&1 | 28 | innobackupex --copy-back $full_backup_dir >> $OUTFILE 2>&1 |
289 | 30 | 29 | ||
291 | 31 | run_mysqld | 30 | start_server |
292 | 32 | # Check sakila | 31 | # Check sakila |
293 | 33 | ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila | 32 | ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila |
294 | 34 | 33 | ||
295 | === modified file 'test/experimental/xb_race_drop.sh' | |||
296 | --- test/experimental/xb_race_drop.sh 2011-06-10 07:55:26 +0000 | |||
297 | +++ test/experimental/xb_race_drop.sh 2012-06-12 10:40:23 +0000 | |||
298 | @@ -1,7 +1,31 @@ | |||
299 | 1 | . inc/common.sh | 1 | . inc/common.sh |
300 | 2 | 2 | ||
303 | 3 | init | 3 | function race_create_drop() |
304 | 4 | run_mysqld --innodb_file_per_table | 4 | { |
305 | 5 | vlog "Started create/drop table cycle" | ||
306 | 6 | race_cycle_num=$1 | ||
307 | 7 | if [ -z $race_cycle_num ] | ||
308 | 8 | then | ||
309 | 9 | race_cycle_num=1000 | ||
310 | 10 | fi | ||
311 | 11 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create database race;" | ||
312 | 12 | race_cycle_cnt=0; | ||
313 | 13 | while [ "$race_cycle_num" -gt "$race_cycle_cnt"] | ||
314 | 14 | do | ||
315 | 15 | t1=tr$RANDOM | ||
316 | 16 | t2=tr$RANDOM | ||
317 | 17 | t3=tr$RANDOM | ||
318 | 18 | ${MYSQL} ${MYSQL_ARGS} -e "create table $t1 (a int) ENGINE=InnoDB;" race | ||
319 | 19 | ${MYSQL} ${MYSQL_ARGS} -e "create table $t2 (a int) ENGINE=InnoDB;" race | ||
320 | 20 | ${MYSQL} ${MYSQL_ARGS} -e "create table $t3 (a int) ENGINE=InnoDB;" race | ||
321 | 21 | ${MYSQL} ${MYSQL_ARGS} -e "drop table $t1;" race | ||
322 | 22 | ${MYSQL} ${MYSQL_ARGS} -e "drop table $t2;" race | ||
323 | 23 | ${MYSQL} ${MYSQL_ARGS} -e "drop table $t3;" race | ||
324 | 24 | let "race_cycle_cnt=race_cycle_cnt+1" | ||
325 | 25 | done | ||
326 | 26 | } | ||
327 | 27 | |||
328 | 28 | start_server --innodb_file_per_table | ||
329 | 5 | 29 | ||
330 | 6 | run_cmd race_create_drop & | 30 | run_cmd race_create_drop & |
331 | 7 | 31 | ||
332 | 8 | 32 | ||
333 | === modified file 'test/inc/common.sh' | |||
334 | --- test/inc/common.sh 2012-02-10 20:05:56 +0000 | |||
335 | +++ test/inc/common.sh 2012-06-12 10:40:23 +0000 | |||
336 | @@ -17,25 +17,10 @@ | |||
337 | 17 | echo "`date +"%F %T"`: `basename "$0"`: $@" >&2 | 17 | echo "`date +"%F %T"`: `basename "$0"`: $@" >&2 |
338 | 18 | } | 18 | } |
339 | 19 | 19 | ||
340 | 20 | function clean_datadir() | ||
341 | 21 | { | ||
342 | 22 | vlog "Removing MySQL data directory: $mysql_datadir" | ||
343 | 23 | rm -rf "$mysql_datadir" | ||
344 | 24 | vlog "Creating MySQL data directory: $mysql_datadir" | ||
345 | 25 | mkdir -p "$mysql_datadir" | ||
346 | 26 | init_mysql_dir | ||
347 | 27 | } | ||
348 | 28 | 20 | ||
349 | 29 | function clean() | 21 | function clean() |
350 | 30 | { | 22 | { |
359 | 31 | vlog "Removing temporary $topdir" | 23 | rm -rf ${TEST_BASEDIR}/var[0-9] |
352 | 32 | rm -rf "$topdir" | ||
353 | 33 | } | ||
354 | 34 | function clean_on_error() | ||
355 | 35 | { | ||
356 | 36 | vlog "Exit on error" | ||
357 | 37 | clean | ||
358 | 38 | exit -1 | ||
360 | 39 | } | 24 | } |
361 | 40 | 25 | ||
362 | 41 | function die() | 26 | function die() |
363 | @@ -44,86 +29,46 @@ | |||
364 | 44 | exit 1 | 29 | exit 1 |
365 | 45 | } | 30 | } |
366 | 46 | 31 | ||
367 | 47 | function initdir() | ||
368 | 48 | { | ||
369 | 49 | if test -d "$topdir" | ||
370 | 50 | then | ||
371 | 51 | vlog "Directory $topdir exists. Removing it..." | ||
372 | 52 | rm -r "$topdir" | ||
373 | 53 | fi | ||
374 | 54 | vlog "Creating temporary directory: $topdir" | ||
375 | 55 | mkdir -p "$topdir/tmp" | ||
376 | 56 | vlog "Creating MySQL data directory: $mysql_datadir" | ||
377 | 57 | mkdir -p "$mysql_datadir" | ||
378 | 58 | } | ||
379 | 59 | |||
380 | 60 | function init_mysql_dir() | 32 | function init_mysql_dir() |
381 | 61 | { | 33 | { |
404 | 62 | vlog "Creating MySQL database" | 34 | if [ ! -d "$MYSQLD_VARDIR" ] |
405 | 63 | $MYSQL_INSTALL_DB --no-defaults --basedir=$MYSQL_BASEDIR --datadir="$mysql_datadir" --tmpdir="$mysql_tmpdir" | 35 | then |
406 | 64 | } | 36 | vlog "Creating server root directory: $MYSQLD_VARDIR" |
407 | 65 | function set_mysql_port() | 37 | mkdir "$MYSQLD_VARDIR" |
408 | 66 | { | 38 | fi |
409 | 67 | i=$mysql_port | 39 | if [ ! -d "$MYSQLD_TMPDIR" ] |
410 | 68 | while [ $i -lt 65536 ] | 40 | then |
411 | 69 | do | 41 | vlog "Creating server temporary directory: $MYSQLD_TMPDIR" |
412 | 70 | # check if port $i is used | 42 | mkdir "$MYSQLD_TMPDIR" |
413 | 71 | vlog "Checking port $i" | 43 | fi |
414 | 72 | port_status=`netstat -an | grep LISTEN | grep tcp | grep -w "$i " || true` | 44 | if [ ! -d "$MYSQLD_DATADIR" ] |
415 | 73 | if test -z "$port_status" | 45 | then |
416 | 74 | then | 46 | vlog "Creating server data directory: $MYSQLD_DATADIR" |
417 | 75 | # port is not used | 47 | mkdir -p "$MYSQLD_DATADIR" |
418 | 76 | vlog "Port $i is free" | 48 | vlog "Calling mysql_install_db" |
419 | 77 | mysql_port=$i | 49 | $MYSQL_INSTALL_DB --no-defaults --basedir=$MYSQL_BASEDIR --datadir="$MYSQLD_DATADIR" --tmpdir="$MYSQLD_TMPDIR" |
420 | 78 | break | 50 | fi |
399 | 79 | else | ||
400 | 80 | vlog "Port $i is used" | ||
401 | 81 | let i=$i+1 | ||
402 | 82 | fi | ||
403 | 83 | done | ||
421 | 84 | } | 51 | } |
422 | 85 | 52 | ||
423 | 53 | ######################################################################## | ||
424 | 86 | # Checks whether MySQL is alive | 54 | # Checks whether MySQL is alive |
425 | 55 | ######################################################################## | ||
426 | 87 | function mysql_ping() | 56 | function mysql_ping() |
427 | 88 | { | 57 | { |
436 | 89 | local result="0" | 58 | $MYSQLADMIN $MYSQL_ARGS --wait=100 ping >/dev/null 2>&1 || return 1 |
429 | 90 | if test -S ${mysql_socket} | ||
430 | 91 | then | ||
431 | 92 | result=`${MYSQL} ${MYSQL_ARGS} -e "SELECT IF(COUNT(*)>=0, 1, 1) FROM user;" -s --skip-column-names mysql 2>/dev/null` || result="0" | ||
432 | 93 | else | ||
433 | 94 | result="0" | ||
434 | 95 | fi | ||
435 | 96 | echo $result | ||
437 | 97 | } | 59 | } |
438 | 98 | 60 | ||
439 | 99 | function kill_leftovers() | 61 | function kill_leftovers() |
440 | 100 | { | 62 | { |
467 | 101 | while test -f "$PIDDIR/mysqld.pid" | 63 | local file |
468 | 102 | do | 64 | for file in ${TEST_BASEDIR}/mysqld*.pid |
469 | 103 | vlog "Found a leftover mysqld processes with PID `cat $PIDDIR/mysqld.pid`, stopping it" | 65 | do |
470 | 104 | stop_mysqld 2> /dev/null | 66 | if [ -f $file ] |
471 | 105 | done | 67 | then |
472 | 106 | } | 68 | vlog "Found a leftover mysqld processes with PID `cat $file`, stopping it" |
473 | 107 | 69 | kill -9 `cat $file` 2>/dev/null || true | |
474 | 108 | function run_mysqld() | 70 | fi |
475 | 109 | { | 71 | done |
450 | 110 | local c=0 | ||
451 | 111 | kill_leftovers | ||
452 | 112 | ${MYSQLD} ${MYSQLD_ARGS} $* --pid-file="$PIDDIR/mysqld.pid" & | ||
453 | 113 | while [ "`mysql_ping`" != "1" ] | ||
454 | 114 | do | ||
455 | 115 | if [ ${c} -eq 100 ] | ||
456 | 116 | then | ||
457 | 117 | vlog "Can't run MySQL!" | ||
458 | 118 | clean_on_error | ||
459 | 119 | fi | ||
460 | 120 | let c=${c}+1 | ||
461 | 121 | sleep 1 | ||
462 | 122 | done | ||
463 | 123 | if [ -n "$MYSQL_VERSION" -a -n "$INNODB_VERSION" ] | ||
464 | 124 | then | ||
465 | 125 | vlog "MySQL $MYSQL_VERSION (InnoDB $INNODB_VERSION) started successfully" | ||
466 | 126 | fi | ||
476 | 127 | } | 72 | } |
477 | 128 | 73 | ||
478 | 129 | function run_cmd() | 74 | function run_cmd() |
479 | @@ -152,21 +97,6 @@ | |||
480 | 152 | fi | 97 | fi |
481 | 153 | } | 98 | } |
482 | 154 | 99 | ||
483 | 155 | function stop_mysqld() | ||
484 | 156 | { | ||
485 | 157 | if [ -f "$PIDDIR/mysqld.pid" ] | ||
486 | 158 | then | ||
487 | 159 | ${MYSQLADMIN} ${MYSQL_ARGS} shutdown | ||
488 | 160 | vlog "Database server has been stopped" | ||
489 | 161 | if [ -f "$PIDDIR/mysqld.pid" ] | ||
490 | 162 | then | ||
491 | 163 | sleep 1; | ||
492 | 164 | kill -9 `cat $PIDDIR/mysqld.pid` | ||
493 | 165 | rm -f $PIDDIR/mysqld.pid | ||
494 | 166 | fi | ||
495 | 167 | fi | ||
496 | 168 | } | ||
497 | 169 | |||
498 | 170 | function load_sakila() | 100 | function load_sakila() |
499 | 171 | { | 101 | { |
500 | 172 | vlog "Loading sakila" | 102 | vlog "Loading sakila" |
501 | @@ -196,39 +126,236 @@ | |||
502 | 196 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "DROP DATABASE $1" | 126 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "DROP DATABASE $1" |
503 | 197 | } | 127 | } |
504 | 198 | 128 | ||
510 | 199 | function init() | 129 | ######################################################################## |
511 | 200 | { | 130 | # Choose a free port for a MySQL server instance |
512 | 201 | initdir | 131 | ######################################################################## |
513 | 202 | init_mysql_dir | 132 | function get_free_port() |
514 | 203 | echo " | 133 | { |
515 | 134 | local id=$1 | ||
516 | 135 | local port | ||
517 | 136 | local lockfile | ||
518 | 137 | |||
519 | 138 | for (( port=PORT_BASE+id; port < 65535; port++)) | ||
520 | 139 | do | ||
521 | 140 | lockfile="/tmp/xtrabackup_port_lock.$port" | ||
522 | 141 | # Try to atomically lock the current port number | ||
523 | 142 | if ! set -C > $lockfile | ||
524 | 143 | then | ||
525 | 144 | set +C | ||
526 | 145 | # check if the process still exists | ||
527 | 146 | if kill -0 "`cat $lockfile`" | ||
528 | 147 | then | ||
529 | 148 | continue; | ||
530 | 149 | fi | ||
531 | 150 | # stale file, overwrite it with the current PID | ||
532 | 151 | fi | ||
533 | 152 | set +C | ||
534 | 153 | echo $$ > $lockfile | ||
535 | 154 | if ! nc -z -w1 localhost $port >/dev/null 2>&1 | ||
536 | 155 | then | ||
537 | 156 | echo $port | ||
538 | 157 | return 0 | ||
539 | 158 | fi | ||
540 | 159 | rm -f $lockfile | ||
541 | 160 | done | ||
542 | 161 | |||
543 | 162 | die "Could not find a free port for server id $id!" | ||
544 | 163 | } | ||
545 | 164 | |||
546 | 165 | ######################################################################## | ||
547 | 166 | # Initialize server variables such as datadir, tmpdir, etc. and store | ||
548 | 167 | # them with the specified index in SRV_MYSQLD_* arrays to be used by | ||
549 | 168 | # switch_server() later | ||
550 | 169 | ######################################################################## | ||
551 | 170 | function init_server_variables() | ||
552 | 171 | { | ||
553 | 172 | local id=$1 | ||
554 | 173 | |||
555 | 174 | if [ -n ${SRV_MYSQLD_IDS[$id]:-""} ] | ||
556 | 175 | then | ||
557 | 176 | die "Server with id $id has already been started" | ||
558 | 177 | fi | ||
559 | 178 | |||
560 | 179 | SRV_MYSQLD_IDS[$id]="$id" | ||
561 | 180 | local vardir="${TEST_BASEDIR}/var${id}" | ||
562 | 181 | SRV_MYSQLD_VARDIR[$id]="$vardir" | ||
563 | 182 | SRV_MYSQLD_DATADIR[$id]="$vardir/data" | ||
564 | 183 | SRV_MYSQLD_TMPDIR[$id]="$vardir/tmp" | ||
565 | 184 | SRV_MYSQLD_PIDFILE[$id]="${TEST_BASEDIR}/mysqld${id}.pid" | ||
566 | 185 | SRV_MYSQLD_PORT[$id]=`get_free_port $id` | ||
567 | 186 | SRV_MYSQLD_SOCKET[$id]=`mktemp -t xtrabackup.mysql.sock.XXXXXX` | ||
568 | 187 | } | ||
569 | 188 | |||
570 | 189 | ######################################################################## | ||
571 | 190 | # Reset server variables | ||
572 | 191 | ######################################################################## | ||
573 | 192 | function reset_server_variables() | ||
574 | 193 | { | ||
575 | 194 | local id=$1 | ||
576 | 195 | |||
577 | 196 | if [ -z ${SRV_MYSQLD_VARDIR[$id]:-""} ] | ||
578 | 197 | then | ||
579 | 198 | # Variables have already been reset | ||
580 | 199 | return 0; | ||
581 | 200 | fi | ||
582 | 201 | |||
583 | 202 | SRV_MYSQLD_IDS[$id]= | ||
584 | 203 | SRV_MYSQLD_VARDIR[$id]= | ||
585 | 204 | SRV_MYSQLD_DATADIR[$id]= | ||
586 | 205 | SRV_MYSQLD_TMPDIR[$id]= | ||
587 | 206 | SRV_MYSQLD_PIDFILE[$id]= | ||
588 | 207 | SRV_MYSQLD_PORT[$id]= | ||
589 | 208 | SRV_MYSQLD_SOCKET[$id]= | ||
590 | 209 | } | ||
591 | 210 | |||
592 | 211 | ########################################################################## | ||
593 | 212 | # Change the environment to make all utilities access the server with an | ||
594 | 213 | # id specified in the argument. | ||
595 | 214 | ########################################################################## | ||
596 | 215 | function switch_server() | ||
597 | 216 | { | ||
598 | 217 | local id=$1 | ||
599 | 218 | |||
600 | 219 | MYSQLD_VARDIR="${SRV_MYSQLD_VARDIR[$id]}" | ||
601 | 220 | MYSQLD_DATADIR="${SRV_MYSQLD_DATADIR[$id]}" | ||
602 | 221 | MYSQLD_TMPDIR="${SRV_MYSQLD_TMPDIR[$id]}" | ||
603 | 222 | MYSQLD_PIDFILE="${SRV_MYSQLD_PIDFILE[$id]}" | ||
604 | 223 | MYSQLD_PORT="${SRV_MYSQLD_PORT[$id]}" | ||
605 | 224 | MYSQLD_SOCKET="${SRV_MYSQLD_SOCKET[$id]}" | ||
606 | 225 | |||
607 | 226 | MYSQL_ARGS="--no-defaults --socket=${MYSQLD_SOCKET} --user=root" | ||
608 | 227 | MYSQLD_ARGS="--no-defaults --basedir=${MYSQL_BASEDIR} \ | ||
609 | 228 | --socket=${MYSQLD_SOCKET} --port=${MYSQLD_PORT} --server-id=$id \ | ||
610 | 229 | --datadir=${MYSQLD_DATADIR} --tmpdir=${MYSQLD_TMPDIR} --log-bin=mysql-bin \ | ||
611 | 230 | --relay-log=mysql-relay-bin --pid-file=${MYSQLD_PIDFILE} ${MYSQLD_EXTRA_ARGS}" | ||
612 | 231 | if [ "`whoami`" = "root" ] | ||
613 | 232 | then | ||
614 | 233 | MYSQLD_ARGS="$MYSQLD_ARGS --user=root" | ||
615 | 234 | fi | ||
616 | 235 | |||
617 | 236 | IB_ARGS="--defaults-file=${MYSQLD_VARDIR}/my.cnf --user=root \ | ||
618 | 237 | --socket=${MYSQLD_SOCKET} --ibbackup=$XB_BIN" | ||
619 | 238 | XB_ARGS="--no-defaults" | ||
620 | 239 | |||
621 | 240 | # Some aliases for compatibility, as tests use the following names | ||
622 | 241 | topdir="$MYSQLD_VARDIR" | ||
623 | 242 | mysql_datadir="$MYSQLD_DATADIR" | ||
624 | 243 | mysql_tmpdir="$MYSQLD_TMPDIR" | ||
625 | 244 | mysql_socket="$MYSQLD_SOCKET" | ||
626 | 245 | } | ||
627 | 246 | |||
628 | 247 | ######################################################################## | ||
629 | 248 | # Start server with the id specified as the first argument | ||
630 | 249 | ######################################################################## | ||
631 | 250 | function start_server_with_id() | ||
632 | 251 | { | ||
633 | 252 | local id=$1 | ||
634 | 253 | shift | ||
635 | 254 | |||
636 | 255 | vlog "Starting server with id=$id..." | ||
637 | 256 | |||
638 | 257 | init_server_variables $id | ||
639 | 258 | switch_server $id | ||
640 | 259 | |||
641 | 260 | init_mysql_dir | ||
642 | 261 | cat > ${MYSQLD_VARDIR}/my.cnf <<EOF | ||
643 | 204 | [mysqld] | 262 | [mysqld] |
671 | 205 | datadir=$mysql_datadir | 263 | datadir=${MYSQLD_DATADIR} |
672 | 206 | tmpdir=$mysql_tmpdir" > $topdir/my.cnf | 264 | tmpdir=${MYSQLD_TMPDIR} |
673 | 207 | } | 265 | EOF |
674 | 208 | 266 | ||
675 | 209 | function race_create_drop() | 267 | # Start the server |
676 | 210 | { | 268 | ${MYSQLD} ${MYSQLD_ARGS} $* & |
677 | 211 | vlog "Started create/drop table cycle" | 269 | if ! mysql_ping |
678 | 212 | race_cycle_num=$1 | 270 | then |
679 | 213 | if [ -z $race_cycle_num ] | 271 | die "Can't start the server!" |
680 | 214 | then | 272 | fi |
681 | 215 | race_cycle_num=1000 | 273 | vlog "Server with id=$id has been started on port $MYSQLD_PORT, \ |
682 | 216 | fi | 274 | socket $MYSQLD_SOCKET" |
683 | 217 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create database race;" | 275 | } |
684 | 218 | race_cycle_cnt=0; | 276 | |
685 | 219 | while [ "$race_cycle_num" -gt "$race_cycle_cnt"] | 277 | ######################################################################## |
686 | 220 | do | 278 | # Stop server with the id specified as the first argument and additional |
687 | 221 | t1=tr$RANDOM | 279 | # command line arguments (if specified) |
688 | 222 | t2=tr$RANDOM | 280 | ######################################################################## |
689 | 223 | t3=tr$RANDOM | 281 | function stop_server_with_id() |
690 | 224 | ${MYSQL} ${MYSQL_ARGS} -e "create table $t1 (a int) ENGINE=InnoDB;" race | 282 | { |
691 | 225 | ${MYSQL} ${MYSQL_ARGS} -e "create table $t2 (a int) ENGINE=InnoDB;" race | 283 | local id=$1 |
692 | 226 | ${MYSQL} ${MYSQL_ARGS} -e "create table $t3 (a int) ENGINE=InnoDB;" race | 284 | switch_server $id |
693 | 227 | ${MYSQL} ${MYSQL_ARGS} -e "drop table $t1;" race | 285 | |
694 | 228 | ${MYSQL} ${MYSQL_ARGS} -e "drop table $t2;" race | 286 | vlog "Stopping server with id=$id..." |
695 | 229 | ${MYSQL} ${MYSQL_ARGS} -e "drop table $t3;" race | 287 | |
696 | 230 | let "race_cycle_cnt=race_cycle_cnt+1" | 288 | if [ -f "${MYSQLD_PIDFILE}" ] |
697 | 231 | done | 289 | then |
698 | 290 | ${MYSQLADMIN} ${MYSQL_ARGS} --shutdown-timeout=60 shutdown | ||
699 | 291 | if [ -f "${MYSQLD_PIDFILE}" ] | ||
700 | 292 | then | ||
701 | 293 | vlog "Could not stop the server with id=$id, using kill -9" | ||
702 | 294 | kill -9 `cat ${MYSQLD_PIDFILE}` | ||
703 | 295 | rm -f ${MYSQLD_PIDFILE} | ||
704 | 296 | fi | ||
705 | 297 | vlog "Server with id=$id has been stopped" | ||
706 | 298 | else | ||
707 | 299 | vlog "Server pid file '${MYSQLD_PIDFILE}' doesn't exist!" | ||
708 | 300 | fi | ||
709 | 301 | |||
710 | 302 | # unlock the port number | ||
711 | 303 | rm -f /tmp/xtrabackup_port_lock.$MYSQLD_PORT | ||
712 | 304 | |||
713 | 305 | reset_server_variables $id | ||
714 | 306 | } | ||
715 | 307 | |||
716 | 308 | ######################################################################## | ||
717 | 309 | # Start server with id=1 and additional command line arguments | ||
718 | 310 | # (if specified) | ||
719 | 311 | ######################################################################## | ||
720 | 312 | function start_server() | ||
721 | 313 | { | ||
722 | 314 | start_server_with_id 1 $* | ||
723 | 315 | } | ||
724 | 316 | |||
725 | 317 | ######################################################################## | ||
726 | 318 | # Stop server with id=1 | ||
727 | 319 | ######################################################################## | ||
728 | 320 | function stop_server() | ||
729 | 321 | { | ||
730 | 322 | stop_server_with_id 1 | ||
731 | 323 | } | ||
732 | 324 | |||
733 | 325 | ######################################################################## | ||
734 | 326 | # Stop all running servers | ||
735 | 327 | ######################################################################## | ||
736 | 328 | function stop_all_servers() | ||
737 | 329 | { | ||
738 | 330 | local id | ||
739 | 331 | for id in ${SRV_MYSQLD_IDS[*]} | ||
740 | 332 | do | ||
741 | 333 | stop_server_with_id ${SRV_MYSQLD_IDS[$id]} | ||
742 | 334 | done | ||
743 | 335 | } | ||
744 | 336 | |||
745 | 337 | ######################################################################## | ||
746 | 338 | # Configure a specified server as a slave | ||
747 | 339 | # Synopsis: | ||
748 | 340 | # setup_slave <slave_id> <master_id> | ||
749 | 341 | ######################################################################### | ||
750 | 342 | function setup_slave() | ||
751 | 343 | { | ||
752 | 344 | local slave_id=$1 | ||
753 | 345 | local master_id=$2 | ||
754 | 346 | |||
755 | 347 | vlog "Setting up server #$slave_id as a slave of server #$master_id" | ||
756 | 348 | |||
757 | 349 | switch_server $slave_id | ||
758 | 350 | |||
759 | 351 | run_cmd $MYSQL $MYSQL_ARGS <<EOF | ||
760 | 352 | CHANGE MASTER TO | ||
761 | 353 | MASTER_HOST='localhost', | ||
762 | 354 | MASTER_USER='root', | ||
763 | 355 | MASTER_PORT=${SRV_MYSQLD_PORT[$master_id]}; | ||
764 | 356 | |||
765 | 357 | START SLAVE | ||
766 | 358 | EOF | ||
767 | 232 | } | 359 | } |
768 | 233 | 360 | ||
769 | 234 | ######################################################################## | 361 | ######################################################################## |
770 | @@ -239,3 +366,6 @@ | |||
771 | 239 | { | 366 | { |
772 | 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'} |
773 | 241 | } | 368 | } |
774 | 369 | |||
775 | 370 | # To avoid unbound variable error when no server have been started | ||
776 | 371 | SRV_MYSQLD_IDS= | ||
777 | 242 | 372 | ||
778 | === modified file 'test/inc/ib_stream_common.sh' | |||
779 | --- test/inc/ib_stream_common.sh 2012-02-10 20:05:56 +0000 | |||
780 | +++ test/inc/ib_stream_common.sh 2012-06-12 10:40:23 +0000 | |||
781 | @@ -12,8 +12,8 @@ | |||
782 | 12 | 12 | ||
783 | 13 | . inc/common.sh | 13 | . inc/common.sh |
784 | 14 | 14 | ||
787 | 15 | init | 15 | start_server --innodb_file_per_table |
788 | 16 | run_mysqld --innodb_file_per_table | 16 | |
789 | 17 | load_dbase_schema sakila | 17 | load_dbase_schema sakila |
790 | 18 | load_dbase_data sakila | 18 | load_dbase_data sakila |
791 | 19 | 19 | ||
792 | @@ -23,7 +23,7 @@ | |||
793 | 23 | mkdir -p $topdir/backup | 23 | mkdir -p $topdir/backup |
794 | 24 | innobackupex --stream=$stream_format $innobackupex_options $topdir/backup > $topdir/backup/out | 24 | innobackupex --stream=$stream_format $innobackupex_options $topdir/backup > $topdir/backup/out |
795 | 25 | 25 | ||
797 | 26 | stop_mysqld | 26 | stop_server |
798 | 27 | 27 | ||
799 | 28 | # Remove datadir | 28 | # Remove datadir |
800 | 29 | rm -r $mysql_datadir | 29 | rm -r $mysql_datadir |
801 | @@ -46,6 +46,6 @@ | |||
802 | 46 | vlog "###########" | 46 | vlog "###########" |
803 | 47 | innobackupex --copy-back $backup_dir | 47 | innobackupex --copy-back $backup_dir |
804 | 48 | 48 | ||
806 | 49 | run_mysqld | 49 | start_server |
807 | 50 | # Check sakila | 50 | # Check sakila |
808 | 51 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila | 51 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila |
809 | 52 | 52 | ||
810 | === modified file 'test/run.sh' | |||
811 | --- test/run.sh 2012-02-10 20:05:56 +0000 | |||
812 | +++ test/run.sh 2012-06-12 10:40:23 +0000 | |||
813 | @@ -1,5 +1,7 @@ | |||
814 | 1 | #!/bin/bash | 1 | #!/bin/bash |
815 | 2 | 2 | ||
816 | 3 | export DEBUG= | ||
817 | 4 | |||
818 | 3 | . inc/common.sh | 5 | . inc/common.sh |
819 | 4 | 6 | ||
820 | 5 | set +e | 7 | set +e |
821 | @@ -14,7 +16,7 @@ | |||
822 | 14 | Usage: $0 [-f] [-g] [-h] [-s suite] [-t test_name] [-d mysql_basedir] [-c build_conf] | 16 | Usage: $0 [-f] [-g] [-h] [-s suite] [-t test_name] [-d mysql_basedir] [-c build_conf] |
823 | 15 | -f Continue running tests after failures | 17 | -f Continue running tests after failures |
824 | 16 | -d path Server installation directory. Default is './server'. | 18 | -d path Server installation directory. Default is './server'. |
826 | 17 | -g Output debug information to results/*.out | 19 | -g Debug mode |
827 | 18 | -t path Run only a single named test | 20 | -t path Run only a single named test |
828 | 19 | -h Print this help message | 21 | -h Print this help message |
829 | 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. |
830 | @@ -52,13 +54,9 @@ | |||
831 | 52 | 54 | ||
832 | 53 | function set_vars() | 55 | function set_vars() |
833 | 54 | { | 56 | { |
841 | 55 | topdir="`pwd`/var" | 57 | TEST_BASEDIR="$PWD" |
842 | 56 | mysql_datadir="$topdir/mysql" | 58 | MYSQL_BASEDIR=${MYSQL_BASEDIR:-"$PWD/server"} |
843 | 57 | mysql_tmpdir="$topdir/tmp" | 59 | PORT_BASE=$((3306 + $RANDOM)) |
837 | 58 | mysql_port="3306" | ||
838 | 59 | mysql_socket=`mktemp -t xtrabackup.mysql.sock.XXXXXX` | ||
839 | 60 | IB_ARGS="--defaults-file=$topdir/my.cnf --user=root --socket=$mysql_socket" | ||
840 | 61 | XB_ARGS="--no-defaults" | ||
844 | 62 | 60 | ||
845 | 63 | if gnutar --version > /dev/null 2>&1 | 61 | if gnutar --version > /dev/null 2>&1 |
846 | 64 | then | 62 | then |
847 | @@ -67,16 +65,6 @@ | |||
848 | 67 | TAR=tar | 65 | TAR=tar |
849 | 68 | fi | 66 | fi |
850 | 69 | 67 | ||
851 | 70 | MYSQL_BASEDIR=${MYSQL_BASEDIR:-"$PWD/server"} | ||
852 | 71 | |||
853 | 72 | MYSQL_ARGS="--no-defaults --socket=${mysql_socket} --user=root" | ||
854 | 73 | |||
855 | 74 | MYSQLD_ARGS="--no-defaults --basedir=${MYSQL_BASEDIR} --socket=${mysql_socket} --datadir=$mysql_datadir --tmpdir=$mysql_tmpdir --skip-networking" | ||
856 | 75 | if [ "`whoami`" = "root" ] | ||
857 | 76 | then | ||
858 | 77 | MYSQLD_ARGS="$MYSQLD_ARGS --user=root" | ||
859 | 78 | fi | ||
860 | 79 | |||
861 | 80 | find_program MYSQL_INSTALL_DB mysql_install_db $MYSQL_BASEDIR/bin \ | 68 | find_program MYSQL_INSTALL_DB mysql_install_db $MYSQL_BASEDIR/bin \ |
862 | 81 | $MYSQL_BASEDIR/scripts | 69 | $MYSQL_BASEDIR/scripts |
863 | 82 | find_program MYSQLD mysqld $MYSQL_BASEDIR/bin/ $MYSQL_BASEDIR/libexec | 70 | find_program MYSQLD mysqld $MYSQL_BASEDIR/bin/ $MYSQL_BASEDIR/libexec |
864 | @@ -92,22 +80,26 @@ | |||
865 | 92 | 80 | ||
866 | 93 | PATH="${MYSQL_BASEDIR}/bin:$PATH" | 81 | PATH="${MYSQL_BASEDIR}/bin:$PATH" |
867 | 94 | 82 | ||
871 | 95 | export topdir mysql_datadir mysql_tmpdir mysql_port mysql_socket OUTFILE \ | 83 | export TEST_BASEDIR PORT_BASE TAR MYSQL_BASEDIR MYSQL MYSQLD MYSQLADMIN \ |
872 | 96 | IB_ARGS XB_ARGS TAR MYSQL_BASEDIR MYSQL MYSQLADMIN \ | 84 | MYSQL_INSTALL_DB PATH |
870 | 97 | MYSQL_ARGS MYSQLD_ARGS MYSQL_INSTALL_DB MYSQLD PATH | ||
873 | 98 | } | 85 | } |
874 | 99 | 86 | ||
875 | 100 | function get_version_info() | 87 | function get_version_info() |
876 | 101 | { | 88 | { |
877 | 89 | MYSQLD_EXTRA_ARGS= | ||
878 | 90 | |||
879 | 91 | XB_BIN="" | ||
880 | 92 | IB_ARGS="--user=root --ibbackup=$XB_BIN" | ||
881 | 93 | XB_ARGS="--no-defaults" | ||
882 | 94 | |||
883 | 102 | if [ "$XB_BUILD" != "autodetect" ] | 95 | if [ "$XB_BUILD" != "autodetect" ] |
884 | 103 | then | 96 | then |
885 | 104 | XB_BIN="" | ||
886 | 105 | case "$XB_BUILD" in | 97 | case "$XB_BUILD" in |
887 | 106 | "innodb51_builtin" ) | 98 | "innodb51_builtin" ) |
888 | 107 | XB_BIN="xtrabackup_51";; | 99 | XB_BIN="xtrabackup_51";; |
889 | 108 | "innodb51" ) | 100 | "innodb51" ) |
890 | 109 | XB_BIN="xtrabackup_plugin" | 101 | XB_BIN="xtrabackup_plugin" |
892 | 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";; |
893 | 111 | "innodb55" ) | 103 | "innodb55" ) |
894 | 112 | XB_BIN="xtrabackup_innodb55";; | 104 | XB_BIN="xtrabackup_innodb55";; |
895 | 113 | "xtradb51" ) | 105 | "xtradb51" ) |
896 | @@ -124,11 +116,11 @@ | |||
897 | 124 | fi | 116 | fi |
898 | 125 | fi | 117 | fi |
899 | 126 | 118 | ||
900 | 127 | init >>$OUTFILE 2>&1 | ||
901 | 128 | |||
902 | 129 | MYSQL_VERSION="" | 119 | MYSQL_VERSION="" |
903 | 130 | INNODB_VERSION="" | 120 | INNODB_VERSION="" |
905 | 131 | run_mysqld >>$OUTFILE 2>&1 | 121 | |
906 | 122 | start_server >>$OUTFILE 2>&1 | ||
907 | 123 | |||
908 | 132 | # Get MySQL and InnoDB versions | 124 | # Get MySQL and InnoDB versions |
909 | 133 | MYSQL_VERSION=`$MYSQL ${MYSQL_ARGS} -Nsf -e "SHOW VARIABLES LIKE 'version'"` | 125 | MYSQL_VERSION=`$MYSQL ${MYSQL_ARGS} -Nsf -e "SHOW VARIABLES LIKE 'version'"` |
910 | 134 | MYSQL_VERSION=${MYSQL_VERSION#"version "} | 126 | MYSQL_VERSION=${MYSQL_VERSION#"version "} |
911 | @@ -178,15 +170,15 @@ | |||
912 | 178 | vlog "Cannot find 'innobackupex' in PATH" | 170 | vlog "Cannot find 'innobackupex' in PATH" |
913 | 179 | return 1 | 171 | return 1 |
914 | 180 | fi | 172 | fi |
916 | 181 | IB_ARGS="$IB_ARGS --ibbackup=$XB_BIN" | 173 | |
917 | 174 | stop_server | ||
918 | 182 | 175 | ||
919 | 183 | export MYSQL_VERSION MYSQL_VERSION_COMMENT INNODB_VERSION XTRADB_VERSION \ | 176 | export MYSQL_VERSION MYSQL_VERSION_COMMENT INNODB_VERSION XTRADB_VERSION \ |
921 | 184 | XB_BIN IB_BIN IB_ARGS | 177 | XB_BIN IB_BIN IB_ARGS XB_ARGS MYSQLD_EXTRA_ARGS |
922 | 185 | } | 178 | } |
923 | 186 | 179 | ||
924 | 187 | export SKIPPED_EXIT_CODE=200 | 180 | export SKIPPED_EXIT_CODE=200 |
925 | 188 | 181 | ||
926 | 189 | |||
927 | 190 | tname="" | 182 | tname="" |
928 | 191 | XTRACE_OPTION="" | 183 | XTRACE_OPTION="" |
929 | 192 | XB_BUILD="autodetect" | 184 | XB_BUILD="autodetect" |
930 | @@ -195,7 +187,7 @@ | |||
931 | 195 | case $options in | 187 | case $options in |
932 | 196 | f ) force="yes";; | 188 | f ) force="yes";; |
933 | 197 | t ) tname="$OPTARG";; | 189 | t ) tname="$OPTARG";; |
935 | 198 | g ) XTRACE_OPTION="-x";; | 190 | g ) XTRACE_OPTION="-x"; DEBUG=on;; |
936 | 199 | h ) usage; exit;; | 191 | h ) usage; exit;; |
937 | 200 | s ) tname="$OPTARG/*.sh";; | 192 | s ) tname="$OPTARG/*.sh";; |
938 | 201 | d ) export MYSQL_BASEDIR="$OPTARG";; | 193 | d ) export MYSQL_BASEDIR="$OPTARG";; |
939 | @@ -219,7 +211,8 @@ | |||
940 | 219 | total_count=0 | 211 | total_count=0 |
941 | 220 | 212 | ||
942 | 221 | export OUTFILE="$PWD/results/setup" | 213 | export OUTFILE="$PWD/results/setup" |
944 | 222 | export PIDDIR="$PWD" | 214 | |
945 | 215 | clean >>$OUTFILE 2>&1 | ||
946 | 223 | 216 | ||
947 | 224 | if ! get_version_info | 217 | if ! get_version_info |
948 | 225 | then | 218 | then |
949 | @@ -258,6 +251,12 @@ | |||
950 | 258 | bash $XTRACE_OPTION $t > $OUTFILE 2>&1 | 251 | bash $XTRACE_OPTION $t > $OUTFILE 2>&1 |
951 | 259 | rc=$? | 252 | rc=$? |
952 | 260 | 253 | ||
953 | 254 | if [[ -z "$DEBUG" || -n "$force" ]] | ||
954 | 255 | then | ||
955 | 256 | kill_leftovers >>$OUTFILE 2>&1 | ||
956 | 257 | clean >>$OUTFILE 2>&1 | ||
957 | 258 | fi | ||
958 | 259 | |||
959 | 261 | if [ $rc -eq 0 ] | 260 | if [ $rc -eq 0 ] |
960 | 262 | then | 261 | then |
961 | 263 | echo "[passed]" | 262 | echo "[passed]" |
962 | @@ -284,20 +283,12 @@ | |||
963 | 284 | then | 283 | then |
964 | 285 | break; | 284 | break; |
965 | 286 | fi | 285 | fi |
970 | 287 | fi | 286 | fi |
967 | 288 | |||
968 | 289 | stop_mysqld >/dev/null 2>&1 | ||
969 | 290 | clean >/dev/null 2>&1 | ||
971 | 291 | done | 287 | done |
972 | 292 | 288 | ||
973 | 293 | echo "========================================================================" | 289 | echo "========================================================================" |
974 | 294 | echo | 290 | echo |
975 | 295 | 291 | ||
976 | 296 | if [ -n "$force" -o $failed_count -eq 0 ] | ||
977 | 297 | then | ||
978 | 298 | kill_leftovers | ||
979 | 299 | fi | ||
980 | 300 | |||
981 | 301 | if [ $result -eq 1 ] | 292 | if [ $result -eq 1 ] |
982 | 302 | then | 293 | then |
983 | 303 | echo | 294 | echo |
984 | 304 | 295 | ||
985 | === modified file 'test/t/bug1002688.sh' | |||
986 | --- test/t/bug1002688.sh 2012-05-22 14:52:54 +0000 | |||
987 | +++ test/t/bug1002688.sh 2012-06-12 10:40:23 +0000 | |||
988 | @@ -3,8 +3,7 @@ | |||
989 | 3 | ############################################################################ | 3 | ############################################################################ |
990 | 4 | . inc/common.sh | 4 | . inc/common.sh |
991 | 5 | 5 | ||
994 | 6 | init | 6 | start_server --innodb_file_per_table |
993 | 7 | run_mysqld --innodb_file_per_table | ||
995 | 8 | load_sakila | 7 | load_sakila |
996 | 9 | 8 | ||
997 | 10 | # Full backup | 9 | # Full backup |
998 | @@ -44,7 +43,7 @@ | |||
999 | 44 | vlog "Data prepared for restore" | 43 | vlog "Data prepared for restore" |
1000 | 45 | 44 | ||
1001 | 46 | # Destroying mysql data | 45 | # Destroying mysql data |
1003 | 47 | stop_mysqld | 46 | stop_server |
1004 | 48 | rm -rf $mysql_datadir/* | 47 | rm -rf $mysql_datadir/* |
1005 | 49 | vlog "Data destroyed" | 48 | vlog "Data destroyed" |
1006 | 50 | 49 | ||
1007 | @@ -53,7 +52,7 @@ | |||
1008 | 53 | innobackupex --copy-back $full_backup_dir | 52 | innobackupex --copy-back $full_backup_dir |
1009 | 54 | vlog "Data restored" | 53 | vlog "Data restored" |
1010 | 55 | 54 | ||
1012 | 56 | run_mysqld --innodb_file_per_table | 55 | start_server --innodb_file_per_table |
1013 | 57 | 56 | ||
1014 | 58 | vlog "Checking checksums" | 57 | vlog "Checking checksums" |
1015 | 59 | checksum_b=`checksum_table newdb actor_copy` | 58 | checksum_b=`checksum_table newdb actor_copy` |
1016 | 60 | 59 | ||
1017 | === modified file 'test/t/bug483827.sh' | |||
1018 | --- test/t/bug483827.sh 2012-05-18 11:19:17 +0000 | |||
1019 | +++ test/t/bug483827.sh 2012-06-12 10:40:23 +0000 | |||
1020 | @@ -10,12 +10,9 @@ | |||
1021 | 10 | 10 | ||
1022 | 11 | . inc/common.sh | 11 | . inc/common.sh |
1023 | 12 | 12 | ||
1027 | 13 | init | 13 | start_server |
1025 | 14 | mv ${mysql_datadir} ${mysql_datadir}1 | ||
1026 | 15 | run_mysqld --datadir=${mysql_datadir}1 | ||
1028 | 16 | 14 | ||
1029 | 17 | backup_dir=$topdir/backup | 15 | backup_dir=$topdir/backup |
1030 | 18 | rm -rf $backup_dir | ||
1031 | 19 | 16 | ||
1032 | 20 | # change defaults file from my.cnf to my_multi.cnf | 17 | # change defaults file from my.cnf to my_multi.cnf |
1033 | 21 | modify_args | 18 | modify_args |
1034 | @@ -23,23 +20,23 @@ | |||
1035 | 23 | # make my_multi.cnf | 20 | # make my_multi.cnf |
1036 | 24 | echo " | 21 | echo " |
1037 | 25 | [mysqld1] | 22 | [mysqld1] |
1039 | 26 | datadir=${mysql_datadir}1 | 23 | datadir=${mysql_datadir} |
1040 | 27 | tmpdir=$mysql_tmpdir" > $topdir/my_multi.cnf | 24 | tmpdir=$mysql_tmpdir" > $topdir/my_multi.cnf |
1041 | 28 | 25 | ||
1042 | 29 | # Backup | 26 | # Backup |
1043 | 30 | innobackupex --no-timestamp --defaults-group=mysqld1 $backup_dir | 27 | innobackupex --no-timestamp --defaults-group=mysqld1 $backup_dir |
1044 | 31 | innobackupex --apply-log $backup_dir | 28 | innobackupex --apply-log $backup_dir |
1045 | 32 | 29 | ||
1047 | 33 | stop_mysqld | 30 | stop_server |
1048 | 34 | 31 | ||
1049 | 35 | # clean datadir | 32 | # clean datadir |
1051 | 36 | rm -rf ${mysql_datadir}1/* | 33 | rm -rf ${mysql_datadir}/* |
1052 | 37 | 34 | ||
1053 | 38 | # restore backup | 35 | # restore backup |
1054 | 39 | innobackupex --copy-back --defaults-group=mysqld1 $backup_dir | 36 | innobackupex --copy-back --defaults-group=mysqld1 $backup_dir |
1055 | 40 | 37 | ||
1056 | 41 | # make sure that data are in correct place | 38 | # make sure that data are in correct place |
1059 | 42 | if [ ! -f ${mysql_datadir}1/ibdata1 ] ; then | 39 | if [ ! -f ${mysql_datadir}/ibdata1 ] ; then |
1060 | 43 | vlog "Data not found in ${mysql_datadir}1" | 40 | vlog "Data not found in ${mysql_datadir}" |
1061 | 44 | exit -1 | 41 | exit -1 |
1062 | 45 | fi | 42 | fi |
1063 | 46 | 43 | ||
1064 | === modified file 'test/t/bug489290.sh' | |||
1065 | --- test/t/bug489290.sh 2012-02-13 12:07:03 +0000 | |||
1066 | +++ test/t/bug489290.sh 2012-06-12 10:40:23 +0000 | |||
1067 | @@ -4,8 +4,7 @@ | |||
1068 | 4 | 4 | ||
1069 | 5 | . inc/common.sh | 5 | . inc/common.sh |
1070 | 6 | 6 | ||
1073 | 7 | init | 7 | start_server |
1072 | 8 | run_mysqld | ||
1074 | 9 | 8 | ||
1075 | 10 | backup_dir=$topdir/backup | 9 | backup_dir=$topdir/backup |
1076 | 11 | mkdir -p $backup_dir | 10 | mkdir -p $backup_dir |
1077 | 12 | 11 | ||
1078 | === modified file 'test/t/bug514068.sh' | |||
1079 | --- test/t/bug514068.sh 2012-02-10 20:05:56 +0000 | |||
1080 | +++ test/t/bug514068.sh 2012-06-12 10:40:23 +0000 | |||
1081 | @@ -5,12 +5,11 @@ | |||
1082 | 5 | 5 | ||
1083 | 6 | . inc/common.sh | 6 | . inc/common.sh |
1084 | 7 | 7 | ||
1087 | 8 | init | 8 | start_server |
1086 | 9 | run_mysqld | ||
1088 | 10 | 9 | ||
1089 | 11 | innobackupex --no-timestamp $topdir/backup >$topdir/stdout 2>$topdir/stderr | 10 | innobackupex --no-timestamp $topdir/backup >$topdir/stdout 2>$topdir/stderr |
1090 | 12 | 11 | ||
1092 | 13 | stop_mysqld | 12 | stop_server |
1093 | 14 | # Remove datadir | 13 | # Remove datadir |
1094 | 15 | rm -r $mysql_datadir | 14 | rm -r $mysql_datadir |
1095 | 16 | 15 | ||
1096 | 17 | 16 | ||
1097 | === modified file 'test/t/bug606981.sh' | |||
1098 | --- test/t/bug606981.sh 2012-02-10 20:05:56 +0000 | |||
1099 | +++ test/t/bug606981.sh 2012-06-12 10:40:23 +0000 | |||
1100 | @@ -6,15 +6,15 @@ | |||
1101 | 6 | exit $SKIPPED_EXIT_CODE | 6 | exit $SKIPPED_EXIT_CODE |
1102 | 7 | fi | 7 | fi |
1103 | 8 | 8 | ||
1106 | 9 | init | 9 | start_server --innodb_file_per_table |
1107 | 10 | run_mysqld | 10 | |
1108 | 11 | load_sakila | 11 | load_sakila |
1109 | 12 | 12 | ||
1110 | 13 | # Take backup | 13 | # Take backup |
1111 | 14 | echo "innodb_flush_method=O_DIRECT" >> $topdir/my.cnf | 14 | echo "innodb_flush_method=O_DIRECT" >> $topdir/my.cnf |
1112 | 15 | mkdir -p $topdir/backup | 15 | mkdir -p $topdir/backup |
1113 | 16 | innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar | 16 | innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar |
1115 | 17 | stop_mysqld | 17 | stop_server |
1116 | 18 | 18 | ||
1117 | 19 | # See if xtrabackup was using O_DIRECT | 19 | # See if xtrabackup was using O_DIRECT |
1118 | 20 | if ! grep "xtrabackup: using O_DIRECT" $OUTFILE ; | 20 | if ! grep "xtrabackup: using O_DIRECT" $OUTFILE ; |
1119 | @@ -36,6 +36,6 @@ | |||
1120 | 36 | mkdir -p $mysql_datadir | 36 | mkdir -p $mysql_datadir |
1121 | 37 | innobackupex --copy-back --defaults-file=$topdir/my.cnf $backup_dir | 37 | innobackupex --copy-back --defaults-file=$topdir/my.cnf $backup_dir |
1122 | 38 | 38 | ||
1124 | 39 | run_mysqld | 39 | start_server |
1125 | 40 | # Check sakila | 40 | # Check sakila |
1126 | 41 | ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila | 41 | ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila |
1127 | 42 | 42 | ||
1128 | === modified file 'test/t/bug722638.sh' | |||
1129 | --- test/t/bug722638.sh 2011-09-14 15:32:21 +0000 | |||
1130 | +++ test/t/bug722638.sh 2012-06-12 10:40:23 +0000 | |||
1131 | @@ -3,15 +3,14 @@ | |||
1132 | 3 | # created breaks backup | 3 | # created breaks backup |
1133 | 4 | ######################################################################## | 4 | ######################################################################## |
1134 | 5 | 5 | ||
1136 | 6 | if ! `$XB_BIN --help | grep debug-sync > /dev/null`; then | 6 | . inc/common.sh |
1137 | 7 | |||
1138 | 8 | if ! $XB_BIN --help 2>&1 | grep -q debug-sync; then | ||
1139 | 7 | echo "Requires --debug-sync support" > $SKIPPED_REASON | 9 | echo "Requires --debug-sync support" > $SKIPPED_REASON |
1140 | 8 | exit $SKIPPED_EXIT_CODE | 10 | exit $SKIPPED_EXIT_CODE |
1141 | 9 | fi | 11 | fi |
1142 | 10 | 12 | ||
1147 | 11 | . inc/common.sh | 13 | start_server --innodb_file_per_table |
1144 | 12 | |||
1145 | 13 | init | ||
1146 | 14 | run_mysqld --innodb_file_per_table | ||
1148 | 15 | 14 | ||
1149 | 16 | run_cmd $MYSQL $MYSQL_ARGS test <<EOF | 15 | run_cmd $MYSQL $MYSQL_ARGS test <<EOF |
1150 | 17 | 16 | ||
1151 | @@ -88,14 +87,14 @@ | |||
1152 | 88 | # Prepare | 87 | # Prepare |
1153 | 89 | xtrabackup --datadir=$mysql_datadir --prepare --target-dir=$topdir/backup | 88 | xtrabackup --datadir=$mysql_datadir --prepare --target-dir=$topdir/backup |
1154 | 90 | 89 | ||
1156 | 91 | stop_mysqld | 90 | stop_server |
1157 | 92 | 91 | ||
1158 | 93 | # Restore | 92 | # Restore |
1159 | 94 | rm -rf $mysql_datadir/ibdata1 $mysql_datadir/ib_logfile* \ | 93 | rm -rf $mysql_datadir/ibdata1 $mysql_datadir/ib_logfile* \ |
1160 | 95 | $mysql_datadir/test/*.ibd | 94 | $mysql_datadir/test/*.ibd |
1161 | 96 | cp -r $topdir/backup/* $mysql_datadir | 95 | cp -r $topdir/backup/* $mysql_datadir |
1162 | 97 | 96 | ||
1164 | 98 | run_mysqld --innodb_file_per_table | 97 | start_server --innodb_file_per_table |
1165 | 99 | 98 | ||
1166 | 100 | # Verify checksums | 99 | # Verify checksums |
1167 | 101 | checksum_t1_new=`checksum_table test t1` | 100 | checksum_t1_new=`checksum_table test t1` |
1168 | 102 | 101 | ||
1169 | === modified file 'test/t/bug723097.sh' | |||
1170 | --- test/t/bug723097.sh 2012-02-02 20:35:45 +0000 | |||
1171 | +++ test/t/bug723097.sh 2012-06-12 10:40:23 +0000 | |||
1172 | @@ -1,7 +1,6 @@ | |||
1173 | 1 | . inc/common.sh | 1 | . inc/common.sh |
1174 | 2 | 2 | ||
1177 | 3 | init | 3 | start_server --innodb_file_per_table |
1176 | 4 | run_mysqld --innodb_file_per_table | ||
1178 | 5 | 4 | ||
1179 | 6 | vlog "Loading data from sql file" | 5 | vlog "Loading data from sql file" |
1180 | 7 | run_cmd ${MYSQL} ${MYSQL_ARGS} test < inc/bug723097.sql | 6 | run_cmd ${MYSQL} ${MYSQL_ARGS} test < inc/bug723097.sql |
1181 | @@ -18,12 +17,12 @@ | |||
1182 | 18 | vlog "Backup is done" | 17 | vlog "Backup is done" |
1183 | 19 | xtrabackup --datadir=$mysql_datadir --prepare --target-dir=$topdir/data/full | 18 | xtrabackup --datadir=$mysql_datadir --prepare --target-dir=$topdir/data/full |
1184 | 20 | vlog "Data prepared fo restore" | 19 | vlog "Data prepared fo restore" |
1186 | 21 | stop_mysqld | 20 | stop_server |
1187 | 22 | 21 | ||
1188 | 23 | cd $topdir/data/full/test | 22 | cd $topdir/data/full/test |
1189 | 24 | cp -r * $mysql_datadir/test | 23 | cp -r * $mysql_datadir/test |
1190 | 25 | cd - | 24 | cd - |
1192 | 26 | run_mysqld --innodb_file_per_table | 25 | start_server --innodb_file_per_table |
1193 | 27 | checksum_b=`checksum_table test messages` | 26 | checksum_b=`checksum_table test messages` |
1194 | 28 | vlog "Checksum after is $checksum_b" | 27 | vlog "Checksum after is $checksum_b" |
1195 | 29 | 28 | ||
1196 | 30 | 29 | ||
1197 | === modified file 'test/t/bug723318.sh' | |||
1198 | --- test/t/bug723318.sh 2011-10-13 17:36:00 +0000 | |||
1199 | +++ test/t/bug723318.sh 2012-06-12 10:40:23 +0000 | |||
1200 | @@ -1,7 +1,7 @@ | |||
1201 | 1 | . inc/common.sh | 1 | . inc/common.sh |
1202 | 2 | 2 | ||
1205 | 3 | init | 3 | start_server |
1206 | 4 | run_mysqld | 4 | |
1207 | 5 | load_dbase_schema sakila | 5 | load_dbase_schema sakila |
1208 | 6 | load_dbase_data sakila | 6 | load_dbase_data sakila |
1209 | 7 | 7 | ||
1210 | @@ -10,7 +10,8 @@ | |||
1211 | 10 | mkdir -p $topdir/backup/stream | 10 | mkdir -p $topdir/backup/stream |
1212 | 11 | innobackupex --stream=tar $topdir/backup > $topdir/backup/stream/out.tar | 11 | innobackupex --stream=tar $topdir/backup > $topdir/backup/stream/out.tar |
1213 | 12 | 12 | ||
1215 | 13 | stop_mysqld | 13 | stop_server |
1216 | 14 | |||
1217 | 14 | cd $topdir/backup/stream/ | 15 | cd $topdir/backup/stream/ |
1218 | 15 | $TAR -ixvf out.tar | 16 | $TAR -ixvf out.tar |
1219 | 16 | 17 | ||
1220 | 17 | 18 | ||
1221 | === modified file 'test/t/bug729843.sh' | |||
1222 | --- test/t/bug729843.sh 2011-11-25 18:50:56 +0000 | |||
1223 | +++ test/t/bug729843.sh 2012-06-12 10:40:23 +0000 | |||
1224 | @@ -4,8 +4,7 @@ | |||
1225 | 4 | 4 | ||
1226 | 5 | . inc/common.sh | 5 | . inc/common.sh |
1227 | 6 | 6 | ||
1230 | 7 | init | 7 | start_server |
1229 | 8 | run_mysqld | ||
1231 | 9 | 8 | ||
1232 | 10 | mkdir $topdir/backup | 9 | mkdir $topdir/backup |
1233 | 11 | logfile=$topdir/backup/innobackupex_log | 10 | logfile=$topdir/backup/innobackupex_log |
1234 | 12 | 11 | ||
1235 | === modified file 'test/t/bug733651.sh' | |||
1236 | --- test/t/bug733651.sh 2012-01-31 11:15:25 +0000 | |||
1237 | +++ test/t/bug733651.sh 2012-06-12 10:40:23 +0000 | |||
1238 | @@ -5,14 +5,12 @@ | |||
1239 | 5 | 5 | ||
1240 | 6 | . inc/common.sh | 6 | . inc/common.sh |
1241 | 7 | 7 | ||
1242 | 8 | init | ||
1243 | 9 | |||
1244 | 10 | options="innodb_log_files_in_group innodb_log_file_size" | 8 | options="innodb_log_files_in_group innodb_log_file_size" |
1245 | 11 | if [ ! -z "$XTRADB_VERSION" ]; then | 9 | if [ ! -z "$XTRADB_VERSION" ]; then |
1246 | 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" |
1247 | 13 | fi | 11 | fi |
1248 | 14 | 12 | ||
1250 | 15 | run_mysqld | 13 | start_server |
1251 | 16 | 14 | ||
1252 | 17 | mkdir -p $topdir/backup | 15 | mkdir -p $topdir/backup |
1253 | 18 | innobackupex $topdir/backup | 16 | innobackupex $topdir/backup |
1254 | 19 | 17 | ||
1255 | === modified file 'test/t/bug759225.sh' | |||
1256 | --- test/t/bug759225.sh 2012-02-10 20:05:56 +0000 | |||
1257 | +++ test/t/bug759225.sh 2012-06-12 10:40:23 +0000 | |||
1258 | @@ -16,15 +16,14 @@ | |||
1259 | 16 | exit $SKIPPED_EXIT_CODE | 16 | exit $SKIPPED_EXIT_CODE |
1260 | 17 | fi | 17 | fi |
1261 | 18 | 18 | ||
1264 | 19 | init | 19 | start_server |
1263 | 20 | run_mysqld | ||
1265 | 21 | load_sakila | 20 | load_sakila |
1266 | 22 | 21 | ||
1267 | 23 | # Take backup | 22 | # Take backup |
1268 | 24 | echo "innodb_flush_method=ALL_O_DIRECT" >> $topdir/my.cnf | 23 | echo "innodb_flush_method=ALL_O_DIRECT" >> $topdir/my.cnf |
1269 | 25 | mkdir -p $topdir/backup | 24 | mkdir -p $topdir/backup |
1270 | 26 | innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar | 25 | innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar |
1272 | 27 | stop_mysqld | 26 | stop_server |
1273 | 28 | 27 | ||
1274 | 29 | # See if xtrabackup was using ALL_O_DIRECT | 28 | # See if xtrabackup was using ALL_O_DIRECT |
1275 | 30 | if ! grep "xtrabackup: using ALL_O_DIRECT" $OUTFILE ; | 29 | if ! grep "xtrabackup: using ALL_O_DIRECT" $OUTFILE ; |
1276 | @@ -46,6 +45,6 @@ | |||
1277 | 46 | mkdir -p $mysql_datadir | 45 | mkdir -p $mysql_datadir |
1278 | 47 | innobackupex --copy-back --defaults-file=$topdir/my.cnf $backup_dir | 46 | innobackupex --copy-back --defaults-file=$topdir/my.cnf $backup_dir |
1279 | 48 | 47 | ||
1281 | 49 | run_mysqld | 48 | start_server |
1282 | 50 | # Check sakila | 49 | # Check sakila |
1283 | 51 | ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila | 50 | ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila |
1284 | 52 | 51 | ||
1285 | === modified file 'test/t/bug759701.sh' | |||
1286 | --- test/t/bug759701.sh 2012-02-02 20:35:45 +0000 | |||
1287 | +++ test/t/bug759701.sh 2012-06-12 10:40:23 +0000 | |||
1288 | @@ -4,8 +4,7 @@ | |||
1289 | 4 | ########################################################################## | 4 | ########################################################################## |
1290 | 5 | . inc/common.sh | 5 | . inc/common.sh |
1291 | 6 | 6 | ||
1294 | 7 | init | 7 | start_server --innodb_file_per_table |
1293 | 8 | run_mysqld --innodb_file_per_table | ||
1295 | 9 | load_sakila | 8 | load_sakila |
1296 | 10 | 9 | ||
1297 | 11 | # Full backup | 10 | # Full backup |
1298 | @@ -45,7 +44,7 @@ | |||
1299 | 45 | vlog "Data prepared for restore" | 44 | vlog "Data prepared for restore" |
1300 | 46 | 45 | ||
1301 | 47 | # Destroying mysql data | 46 | # Destroying mysql data |
1303 | 48 | stop_mysqld | 47 | stop_server |
1304 | 49 | rm -rf $mysql_datadir/* | 48 | rm -rf $mysql_datadir/* |
1305 | 50 | vlog "Data destroyed" | 49 | vlog "Data destroyed" |
1306 | 51 | 50 | ||
1307 | @@ -54,7 +53,7 @@ | |||
1308 | 54 | innobackupex --copy-back $full_backup_dir | 53 | innobackupex --copy-back $full_backup_dir |
1309 | 55 | vlog "Data restored" | 54 | vlog "Data restored" |
1310 | 56 | 55 | ||
1312 | 57 | run_mysqld --innodb_file_per_table | 56 | start_server --innodb_file_per_table |
1313 | 58 | 57 | ||
1314 | 59 | vlog "Checking checksums" | 58 | vlog "Checking checksums" |
1315 | 60 | checksum_b=`checksum_table newdb actor_copy` | 59 | checksum_b=`checksum_table newdb actor_copy` |
1316 | 61 | 60 | ||
1317 | === modified file 'test/t/bug766033.sh' | |||
1318 | --- test/t/bug766033.sh 2012-03-09 05:24:24 +0000 | |||
1319 | +++ test/t/bug766033.sh 2012-06-12 10:40:23 +0000 | |||
1320 | @@ -4,25 +4,20 @@ | |||
1321 | 4 | 4 | ||
1322 | 5 | . inc/common.sh | 5 | . inc/common.sh |
1323 | 6 | 6 | ||
1326 | 7 | init | 7 | start_server --innodb_file_per_table |
1325 | 8 | run_mysqld --innodb_file_per_table | ||
1327 | 9 | load_sakila | 8 | load_sakila |
1328 | 10 | 9 | ||
1330 | 11 | stop_mysqld | 10 | stop_server |
1331 | 12 | 11 | ||
1332 | 13 | # Full backup | 12 | # Full backup |
1333 | 14 | vlog "Starting backup" | 13 | vlog "Starting backup" |
1334 | 15 | 14 | ||
1335 | 16 | # corrupt database | 15 | # corrupt database |
1337 | 17 | dd if=/dev/zero of=$mysql_datadir/sakila/rental.ibd seek=1000 count=16384 | 16 | dd if=/dev/zero of=$mysql_datadir/sakila/rental.ibd seek=1000 count=1 |
1338 | 18 | 17 | ||
1339 | 19 | # we want xtrabackup to be failed on rental.ibd | 18 | # we want xtrabackup to be failed on rental.ibd |
1349 | 20 | set +e | 19 | run_cmd_expect_failure $XB_BIN $XB_ARGS --backup --datadir=$mysql_datadir \ |
1350 | 21 | COUNT=`xtrabackup --backup --datadir=$mysql_datadir --target-dir=$topdir/backup 2>&1 \ | 20 | --target-dir=$topdir/backup |
1351 | 22 | | grep "File ./sakila/rental.ibd seems to be corrupted" | wc -l ` | 21 | |
1352 | 23 | set -e | 22 | grep -q "File ./sakila/rental.ibd seems to be corrupted" $OUTFILE |
1353 | 24 | 23 | ||
1345 | 25 | if [ "$COUNT" != "1" ] ; then | ||
1346 | 26 | vlog "test failed" | ||
1347 | 27 | exit 1 | ||
1348 | 28 | fi | ||
1354 | 29 | 24 | ||
1355 | === modified file 'test/t/bug766607.sh' | |||
1356 | --- test/t/bug766607.sh 2011-07-05 04:17:41 +0000 | |||
1357 | +++ test/t/bug766607.sh 2012-06-12 10:40:23 +0000 | |||
1358 | @@ -1,7 +1,6 @@ | |||
1359 | 1 | . inc/common.sh | 1 | . inc/common.sh |
1360 | 2 | 2 | ||
1363 | 3 | init | 3 | start_server --innodb_file_per_table |
1362 | 4 | run_mysqld --innodb_file_per_table | ||
1364 | 5 | load_dbase_schema incremental_sample | 4 | load_dbase_schema incremental_sample |
1365 | 6 | 5 | ||
1366 | 7 | # Full backup dir | 6 | # Full backup dir |
1367 | @@ -18,8 +17,8 @@ | |||
1368 | 18 | FLUSH LOGS; | 17 | FLUSH LOGS; |
1369 | 19 | EOF | 18 | EOF |
1370 | 20 | 19 | ||
1373 | 21 | stop_mysqld | 20 | stop_server |
1374 | 22 | run_mysqld --innodb_file_per_table | 21 | start_server --innodb_file_per_table |
1375 | 23 | 22 | ||
1376 | 24 | vlog "Making incremental backup" | 23 | vlog "Making incremental backup" |
1377 | 25 | xtrabackup --datadir=$mysql_datadir --backup --target-dir=$topdir/data/delta --incremental-basedir=$topdir/data/full | 24 | xtrabackup --datadir=$mysql_datadir --backup --target-dir=$topdir/data/delta --incremental-basedir=$topdir/data/full |
1378 | @@ -37,7 +36,7 @@ | |||
1379 | 37 | xtrabackup --datadir=$mysql_datadir --prepare --target-dir=$topdir/data/full | 36 | xtrabackup --datadir=$mysql_datadir --prepare --target-dir=$topdir/data/full |
1380 | 38 | vlog "Data prepared for restore" | 37 | vlog "Data prepared for restore" |
1381 | 39 | 38 | ||
1383 | 40 | stop_mysqld | 39 | stop_server |
1384 | 41 | 40 | ||
1385 | 42 | vlog "Copying files" | 41 | vlog "Copying files" |
1386 | 43 | 42 | ||
1387 | @@ -46,6 +45,6 @@ | |||
1388 | 46 | cd $topdir | 45 | cd $topdir |
1389 | 47 | 46 | ||
1390 | 48 | vlog "Data restored" | 47 | vlog "Data restored" |
1392 | 49 | run_mysqld --innodb_file_per_table | 48 | start_server --innodb_file_per_table |
1393 | 50 | 49 | ||
1394 | 51 | run_cmd $MYSQL $MYSQL_ARGS -e "SELECT * FROM t" test | 50 | run_cmd $MYSQL $MYSQL_ARGS -e "SELECT * FROM t" test |
1395 | 52 | 51 | ||
1396 | === modified file 'test/t/bug810269.sh' | |||
1397 | --- test/t/bug810269.sh 2011-09-14 17:41:10 +0000 | |||
1398 | +++ test/t/bug810269.sh 2012-06-12 10:40:23 +0000 | |||
1399 | @@ -5,14 +5,12 @@ | |||
1400 | 5 | 5 | ||
1401 | 6 | . inc/common.sh | 6 | . inc/common.sh |
1402 | 7 | 7 | ||
1403 | 8 | init | ||
1404 | 9 | |||
1405 | 10 | if [ -z "$INNODB_VERSION" ]; then | 8 | if [ -z "$INNODB_VERSION" ]; then |
1406 | 11 | echo "Requires InnoDB plugin or XtraDB" >$SKIPPED_REASON | 9 | echo "Requires InnoDB plugin or XtraDB" >$SKIPPED_REASON |
1407 | 12 | exit $SKIPPED_EXIT_CODE | 10 | exit $SKIPPED_EXIT_CODE |
1408 | 13 | fi | 11 | fi |
1409 | 14 | 12 | ||
1411 | 15 | run_mysqld "--innodb_strict_mode --innodb_file_per_table \ | 13 | start_server "--innodb_strict_mode --innodb_file_per_table \ |
1412 | 16 | --innodb_file_format=Barracuda" | 14 | --innodb_file_format=Barracuda" |
1413 | 17 | 15 | ||
1414 | 18 | load_dbase_schema incremental_sample | 16 | load_dbase_schema incremental_sample |
1415 | @@ -54,7 +52,7 @@ | |||
1416 | 54 | 52 | ||
1417 | 55 | innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar | 53 | innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar |
1418 | 56 | 54 | ||
1420 | 57 | stop_mysqld | 55 | stop_server |
1421 | 58 | rm -rf $mysql_datadir | 56 | rm -rf $mysql_datadir |
1422 | 59 | 57 | ||
1423 | 60 | vlog "Applying log" | 58 | vlog "Applying log" |
1424 | @@ -68,7 +66,7 @@ | |||
1425 | 68 | mkdir -p $mysql_datadir | 66 | mkdir -p $mysql_datadir |
1426 | 69 | innobackupex --copy-back $topdir/backup | 67 | innobackupex --copy-back $topdir/backup |
1427 | 70 | 68 | ||
1429 | 71 | run_mysqld | 69 | start_server |
1430 | 72 | 70 | ||
1431 | 73 | checksum_b=`checksum_table incremental_sample test` | 71 | checksum_b=`checksum_table incremental_sample test` |
1432 | 74 | 72 | ||
1433 | 75 | 73 | ||
1434 | === modified file 'test/t/bug817132.sh' | |||
1435 | --- test/t/bug817132.sh 2012-02-02 20:35:45 +0000 | |||
1436 | +++ test/t/bug817132.sh 2012-06-12 10:40:23 +0000 | |||
1437 | @@ -12,8 +12,7 @@ | |||
1438 | 12 | exit $SKIPPED_EXIT_CODE | 12 | exit $SKIPPED_EXIT_CODE |
1439 | 13 | fi | 13 | fi |
1440 | 14 | 14 | ||
1443 | 15 | init | 15 | start_server |
1442 | 16 | run_mysqld | ||
1444 | 17 | load_dbase_schema sakila | 16 | load_dbase_schema sakila |
1445 | 18 | load_dbase_data sakila | 17 | load_dbase_data sakila |
1446 | 19 | 18 | ||
1447 | @@ -22,7 +21,7 @@ | |||
1448 | 22 | backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'` | 21 | backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'` |
1449 | 23 | vlog "Backup created in directory $backup_dir" | 22 | vlog "Backup created in directory $backup_dir" |
1450 | 24 | 23 | ||
1452 | 25 | stop_mysqld | 24 | stop_server |
1453 | 26 | # Remove datadir | 25 | # Remove datadir |
1454 | 27 | rm -r $mysql_datadir | 26 | rm -r $mysql_datadir |
1455 | 28 | 27 | ||
1456 | @@ -37,6 +36,6 @@ | |||
1457 | 37 | # --ibbackup explicitly (see $IB_ARGS). | 36 | # --ibbackup explicitly (see $IB_ARGS). |
1458 | 38 | run_cmd $IB_BIN --defaults-file=$topdir/my.cnf --user=root --socket=$mysql_socket --copy-back $backup_dir | 37 | run_cmd $IB_BIN --defaults-file=$topdir/my.cnf --user=root --socket=$mysql_socket --copy-back $backup_dir |
1459 | 39 | 38 | ||
1461 | 40 | run_mysqld | 39 | start_server |
1462 | 41 | # Check sakila | 40 | # Check sakila |
1463 | 42 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila | 41 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila |
1464 | 43 | 42 | ||
1465 | === modified file 'test/t/bug884737.sh' | |||
1466 | --- test/t/bug884737.sh 2011-11-01 16:17:02 +0000 | |||
1467 | +++ test/t/bug884737.sh 2012-06-12 10:40:23 +0000 | |||
1468 | @@ -5,8 +5,7 @@ | |||
1469 | 5 | 5 | ||
1470 | 6 | . inc/common.sh | 6 | . inc/common.sh |
1471 | 7 | 7 | ||
1474 | 8 | init | 8 | start_server |
1473 | 9 | run_mysqld | ||
1475 | 10 | 9 | ||
1476 | 11 | # Check that --parallel=<negative value> doesn't blow up | 10 | # Check that --parallel=<negative value> doesn't blow up |
1477 | 12 | vlog "Creating the backup directory: $topdir/backup" | 11 | vlog "Creating the backup directory: $topdir/backup" |
1478 | 13 | 12 | ||
1479 | === modified file 'test/t/bug891496.sh' | |||
1480 | --- test/t/bug891496.sh 2012-02-02 20:35:45 +0000 | |||
1481 | +++ test/t/bug891496.sh 2012-06-12 10:40:23 +0000 | |||
1482 | @@ -4,17 +4,14 @@ | |||
1483 | 4 | 4 | ||
1484 | 5 | . inc/common.sh | 5 | . inc/common.sh |
1485 | 6 | 6 | ||
1486 | 7 | init | ||
1487 | 8 | |||
1488 | 9 | innodb_data_file_path="ibdata1:3M;ibdata2:10M:autoextend" | 7 | innodb_data_file_path="ibdata1:3M;ibdata2:10M:autoextend" |
1489 | 10 | 8 | ||
1490 | 9 | start_server --innodb_data_file_path=$innodb_data_file_path | ||
1491 | 10 | |||
1492 | 11 | cat >> $topdir/my.cnf <<EOF | 11 | cat >> $topdir/my.cnf <<EOF |
1493 | 12 | innodb_data_file_path=$innodb_data_file_path | 12 | innodb_data_file_path=$innodb_data_file_path |
1494 | 13 | EOF | 13 | EOF |
1495 | 14 | 14 | ||
1496 | 15 | MYSQLD_ARGS="$MYSQLD_ARGS --innodb_data_file_path=$innodb_data_file_path" | ||
1497 | 16 | |||
1498 | 17 | run_mysqld | ||
1499 | 18 | load_dbase_schema sakila | 15 | load_dbase_schema sakila |
1500 | 19 | load_dbase_data sakila | 16 | load_dbase_data sakila |
1501 | 20 | 17 | ||
1502 | @@ -22,7 +19,7 @@ | |||
1503 | 22 | mkdir -p $topdir/backup | 19 | mkdir -p $topdir/backup |
1504 | 23 | innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar | 20 | innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar |
1505 | 24 | 21 | ||
1507 | 25 | stop_mysqld | 22 | stop_server |
1508 | 26 | # Remove datadir | 23 | # Remove datadir |
1509 | 27 | rm -r $mysql_datadir | 24 | rm -r $mysql_datadir |
1510 | 28 | # Restore sakila | 25 | # Restore sakila |
1511 | @@ -42,6 +39,6 @@ | |||
1512 | 42 | vlog "###########" | 39 | vlog "###########" |
1513 | 43 | innobackupex --copy-back $backup_dir | 40 | innobackupex --copy-back $backup_dir |
1514 | 44 | 41 | ||
1516 | 45 | run_mysqld | 42 | start_server --innodb_data_file_path=$innodb_data_file_path |
1517 | 46 | # Check sakila | 43 | # Check sakila |
1518 | 47 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila | 44 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila |
1519 | 48 | 45 | ||
1520 | === modified file 'test/t/bug972169.sh' | |||
1521 | --- test/t/bug972169.sh 2012-05-15 16:53:07 +0000 | |||
1522 | +++ test/t/bug972169.sh 2012-06-12 10:40:23 +0000 | |||
1523 | @@ -4,9 +4,7 @@ | |||
1524 | 4 | 4 | ||
1525 | 5 | . inc/common.sh | 5 | . inc/common.sh |
1526 | 6 | 6 | ||
1530 | 7 | init | 7 | start_server |
1528 | 8 | |||
1529 | 9 | run_mysqld | ||
1531 | 10 | 8 | ||
1532 | 11 | run_cmd_expect_failure $XB_BIN $XB_ARGS --datadir=$mysql_datadir --backup \ | 9 | run_cmd_expect_failure $XB_BIN $XB_ARGS --datadir=$mysql_datadir --backup \ |
1533 | 12 | --compress --stream=tar | 10 | --compress --stream=tar |
1534 | 13 | 11 | ||
1535 | === added file 'test/t/bug977101.sh' | |||
1536 | --- test/t/bug977101.sh 1970-01-01 00:00:00 +0000 | |||
1537 | +++ test/t/bug977101.sh 2012-06-12 10:40:23 +0000 | |||
1538 | @@ -0,0 +1,31 @@ | |||
1539 | 1 | ######################################################################## | ||
1540 | 2 | # Bug #977101: --safe-slave-backup results in incorrect binlog info | ||
1541 | 3 | ######################################################################## | ||
1542 | 4 | |||
1543 | 5 | . inc/common.sh | ||
1544 | 6 | |||
1545 | 7 | master_id=1 | ||
1546 | 8 | slave_id=2 | ||
1547 | 9 | |||
1548 | 10 | start_server_with_id $master_id | ||
1549 | 11 | start_server_with_id $slave_id | ||
1550 | 12 | |||
1551 | 13 | setup_slave $slave_id $master_id | ||
1552 | 14 | |||
1553 | 15 | # Full backup of the slave server | ||
1554 | 16 | switch_server $slave_id | ||
1555 | 17 | |||
1556 | 18 | # Check that binlog info is correct with --safe-slave-backup | ||
1557 | 19 | innobackupex --no-timestamp --safe-slave-backup $topdir/backup | ||
1558 | 20 | egrep -q '^mysql-bin.000001[[:space:]]+[0-9]+[[:space:]]+$' \ | ||
1559 | 21 | $topdir/backup/xtrabackup_binlog_info | ||
1560 | 22 | |||
1561 | 23 | # Check that both binlog info and slave info are correct with | ||
1562 | 24 | # --safe-slave-backup | ||
1563 | 25 | rm -rf $topdir/backup | ||
1564 | 26 | innobackupex --no-timestamp --slave-info --safe-slave-backup $topdir/backup | ||
1565 | 27 | egrep -q '^mysql-bin.000001[[:space:]]+[0-9]+[[:space:]]+$' \ | ||
1566 | 28 | $topdir/backup/xtrabackup_binlog_info | ||
1567 | 29 | egrep -q '^CHANGE MASTER TO MASTER_LOG_FILE='\''mysql-bin.000001'\'', MASTER_LOG_POS=[0-9]+$' \ | ||
1568 | 30 | $topdir/backup/xtrabackup_slave_info | ||
1569 | 31 | |||
1570 | 0 | 32 | ||
1571 | === modified file 'test/t/bug983685.sh' | |||
1572 | --- test/t/bug983685.sh 2012-05-21 07:54:00 +0000 | |||
1573 | +++ test/t/bug983685.sh 2012-06-12 10:40:23 +0000 | |||
1574 | @@ -4,12 +4,10 @@ | |||
1575 | 4 | 4 | ||
1576 | 5 | . inc/common.sh | 5 | . inc/common.sh |
1577 | 6 | 6 | ||
1579 | 7 | init | 7 | start_server |
1580 | 8 | 8 | ||
1581 | 9 | options="innodb_data_file_path" | 9 | options="innodb_data_file_path" |
1582 | 10 | 10 | ||
1583 | 11 | run_mysqld | ||
1584 | 12 | |||
1585 | 13 | mkdir -p $topdir/backup | 11 | mkdir -p $topdir/backup |
1586 | 14 | innobackupex $topdir/backup | 12 | innobackupex $topdir/backup |
1587 | 15 | backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'` | 13 | backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'` |
1588 | 16 | 14 | ||
1589 | === modified file 'test/t/bug983720_galerainfo.sh' | |||
1590 | --- test/t/bug983720_galerainfo.sh 2012-04-20 06:59:15 +0000 | |||
1591 | +++ test/t/bug983720_galerainfo.sh 2012-06-12 10:40:23 +0000 | |||
1592 | @@ -16,8 +16,7 @@ | |||
1593 | 16 | fi | 16 | fi |
1594 | 17 | set -e | 17 | set -e |
1595 | 18 | 18 | ||
1598 | 19 | init | 19 | start_server --log-bin=`hostname`-bin --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/libgalera_smm.so --wsrep_cluster_address=gcomm:// |
1597 | 20 | run_mysqld --log-bin=`hostname`-bin --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/libgalera_smm.so --wsrep_cluster_address=gcomm:// | ||
1599 | 21 | 20 | ||
1600 | 22 | # take a backup with stream mode | 21 | # take a backup with stream mode |
1601 | 23 | mkdir -p $topdir/backup | 22 | mkdir -p $topdir/backup |
1602 | 24 | 23 | ||
1603 | === modified file 'test/t/bug983720_lrudump.sh' | |||
1604 | --- test/t/bug983720_lrudump.sh 2012-04-20 06:59:15 +0000 | |||
1605 | +++ test/t/bug983720_lrudump.sh 2012-06-12 10:40:23 +0000 | |||
1606 | @@ -9,8 +9,7 @@ | |||
1607 | 9 | exit $SKIPPED_EXIT_CODE | 9 | exit $SKIPPED_EXIT_CODE |
1608 | 10 | fi | 10 | fi |
1609 | 11 | 11 | ||
1612 | 12 | init | 12 | start_server |
1611 | 13 | run_mysqld | ||
1613 | 14 | 13 | ||
1614 | 15 | # produce ib_lru_dump | 14 | # produce ib_lru_dump |
1615 | 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*/;" |
1616 | 17 | 16 | ||
1617 | === modified file 'test/t/bug989397.sh' | |||
1618 | --- test/t/bug989397.sh 2012-05-17 13:34:43 +0000 | |||
1619 | +++ test/t/bug989397.sh 2012-06-12 10:40:23 +0000 | |||
1620 | @@ -5,8 +5,7 @@ | |||
1621 | 5 | 5 | ||
1622 | 6 | . inc/common.sh | 6 | . inc/common.sh |
1623 | 7 | 7 | ||
1626 | 8 | init | 8 | start_server --innodb_file_per_table |
1625 | 9 | run_mysqld --innodb_file_per_table | ||
1627 | 10 | 9 | ||
1628 | 11 | # create table which name ends with opt | 10 | # create table which name ends with opt |
1629 | 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);" |
1630 | 13 | 12 | ||
1631 | === modified file 'test/t/bug996493.sh' | |||
1632 | --- test/t/bug996493.sh 2012-05-18 05:36:49 +0000 | |||
1633 | +++ test/t/bug996493.sh 2012-06-12 10:40:23 +0000 | |||
1634 | @@ -5,16 +5,14 @@ | |||
1635 | 5 | 5 | ||
1636 | 6 | . inc/common.sh | 6 | . inc/common.sh |
1637 | 7 | 7 | ||
1641 | 8 | init | 8 | start_server |
1639 | 9 | |||
1640 | 10 | run_mysqld | ||
1642 | 11 | 9 | ||
1643 | 12 | backup_dir=$topdir/backup | 10 | backup_dir=$topdir/backup |
1644 | 13 | innobackupex --no-timestamp $backup_dir | 11 | innobackupex --no-timestamp $backup_dir |
1645 | 14 | vlog "Backup created in directory $backup_dir" | 12 | vlog "Backup created in directory $backup_dir" |
1646 | 15 | 13 | ||
1647 | 16 | vlog "Stop mysqld" | 14 | vlog "Stop mysqld" |
1649 | 17 | stop_mysqld | 15 | stop_server |
1650 | 18 | 16 | ||
1651 | 19 | vlog "Remove datadir" | 17 | vlog "Remove datadir" |
1652 | 20 | rm -r $mysql_datadir/* | 18 | rm -r $mysql_datadir/* |
1653 | 21 | 19 | ||
1654 | === modified file 'test/t/bug999750.sh' | |||
1655 | --- test/t/bug999750.sh 2012-05-15 16:53:07 +0000 | |||
1656 | +++ test/t/bug999750.sh 2012-06-12 10:40:23 +0000 | |||
1657 | @@ -4,8 +4,6 @@ | |||
1658 | 4 | 4 | ||
1659 | 5 | . inc/common.sh | 5 | . inc/common.sh |
1660 | 6 | 6 | ||
1661 | 7 | init | ||
1662 | 8 | |||
1663 | 9 | # Exclude the built-in InnoDB configuration as it requires a different format | 7 | # Exclude the built-in InnoDB configuration as it requires a different format |
1664 | 10 | # for --incremental-lsn. | 8 | # for --incremental-lsn. |
1665 | 11 | if [ -z "$INNODB_VERSION" ]; then | 9 | if [ -z "$INNODB_VERSION" ]; then |
1666 | @@ -13,7 +11,7 @@ | |||
1667 | 13 | exit $SKIPPED_EXIT_CODE | 11 | exit $SKIPPED_EXIT_CODE |
1668 | 14 | fi | 12 | fi |
1669 | 15 | 13 | ||
1671 | 16 | run_mysqld | 14 | start_server |
1672 | 17 | 15 | ||
1673 | 18 | run_cmd_expect_failure $XB_BIN $XB_ARGS --datadir=$mysql_datadir --backup \ | 16 | run_cmd_expect_failure $XB_BIN $XB_ARGS --datadir=$mysql_datadir --backup \ |
1674 | 19 | --incremental-lsn=0 --stream=tar | 17 | --incremental-lsn=0 --stream=tar |
1675 | 20 | 18 | ||
1676 | === modified file 'test/t/ib_binlog_info.sh' | |||
1677 | --- test/t/ib_binlog_info.sh 2012-02-06 10:10:40 +0000 | |||
1678 | +++ test/t/ib_binlog_info.sh 2012-06-12 10:40:23 +0000 | |||
1679 | @@ -4,8 +4,7 @@ | |||
1680 | 4 | 4 | ||
1681 | 5 | . inc/common.sh | 5 | . inc/common.sh |
1682 | 6 | 6 | ||
1685 | 7 | init | 7 | start_server |
1684 | 8 | run_mysqld | ||
1686 | 9 | load_sakila | 8 | load_sakila |
1687 | 10 | 9 | ||
1688 | 11 | innobackupex --no-timestamp $topdir/backup | 10 | innobackupex --no-timestamp $topdir/backup |
1689 | 12 | 11 | ||
1690 | === modified file 'test/t/ib_csm_csv.sh' | |||
1691 | --- test/t/ib_csm_csv.sh 2012-02-02 20:35:45 +0000 | |||
1692 | +++ test/t/ib_csm_csv.sh 2012-06-12 10:40:23 +0000 | |||
1693 | @@ -1,7 +1,6 @@ | |||
1694 | 1 | . inc/common.sh | 1 | . inc/common.sh |
1695 | 2 | 2 | ||
1698 | 3 | init | 3 | start_server --innodb_file_per_table |
1697 | 4 | run_mysqld --innodb_file_per_table | ||
1699 | 5 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create database csv" | 4 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create database csv" |
1700 | 6 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create table csm (a int NOT NULL ) ENGINE=CSV" csv | 5 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "create table csm (a int NOT NULL ) ENGINE=CSV" csv |
1701 | 7 | # Adding initial rows | 6 | # Adding initial rows |
1702 | @@ -37,7 +36,7 @@ | |||
1703 | 37 | vlog "Data prepared for restore" | 36 | vlog "Data prepared for restore" |
1704 | 38 | 37 | ||
1705 | 39 | # Destroying mysql data | 38 | # Destroying mysql data |
1707 | 40 | stop_mysqld | 39 | stop_server |
1708 | 41 | rm -rf $mysql_datadir/* | 40 | rm -rf $mysql_datadir/* |
1709 | 42 | vlog "Data destroyed" | 41 | vlog "Data destroyed" |
1710 | 43 | 42 | ||
1711 | @@ -49,7 +48,7 @@ | |||
1712 | 49 | innobackupex --copy-back $full_backup_dir | 48 | innobackupex --copy-back $full_backup_dir |
1713 | 50 | vlog "Data restored" | 49 | vlog "Data restored" |
1714 | 51 | 50 | ||
1716 | 52 | run_mysqld --innodb_file_per_table | 51 | start_server --innodb_file_per_table |
1717 | 53 | checksum_b=`checksum_table csv csm` | 52 | checksum_b=`checksum_table csv csm` |
1718 | 54 | vlog "Checking checksums: $checksum_a/$checksum_b" | 53 | vlog "Checking checksums: $checksum_a/$checksum_b" |
1719 | 55 | 54 | ||
1720 | 56 | 55 | ||
1721 | === modified file 'test/t/ib_empty_dir.sh' | |||
1722 | --- test/t/ib_empty_dir.sh 2011-11-28 09:26:22 +0000 | |||
1723 | +++ test/t/ib_empty_dir.sh 2012-06-12 10:40:23 +0000 | |||
1724 | @@ -1,14 +1,13 @@ | |||
1725 | 1 | # Test for bug https://bugs.launchpad.net/percona-xtrabackup/+bug/737569 | 1 | # Test for bug https://bugs.launchpad.net/percona-xtrabackup/+bug/737569 |
1726 | 2 | . inc/common.sh | 2 | . inc/common.sh |
1727 | 3 | 3 | ||
1730 | 4 | init | 4 | start_server |
1729 | 5 | run_mysqld | ||
1731 | 6 | 5 | ||
1732 | 7 | innobackupex --no-timestamp $topdir/backup | 6 | innobackupex --no-timestamp $topdir/backup |
1733 | 8 | backup_dir=$topdir/backup | 7 | backup_dir=$topdir/backup |
1734 | 9 | vlog "Backup created in directory $backup_dir" | 8 | vlog "Backup created in directory $backup_dir" |
1735 | 10 | 9 | ||
1737 | 11 | stop_mysqld | 10 | stop_server |
1738 | 12 | # Remove datadir | 11 | # Remove datadir |
1739 | 13 | rm -r $mysql_datadir | 12 | rm -r $mysql_datadir |
1740 | 14 | # Restore backup | 13 | # Restore backup |
1741 | 15 | 14 | ||
1742 | === modified file 'test/t/ib_incremental.sh' | |||
1743 | --- test/t/ib_incremental.sh 2012-02-02 20:35:45 +0000 | |||
1744 | +++ test/t/ib_incremental.sh 2012-06-12 10:40:23 +0000 | |||
1745 | @@ -1,7 +1,6 @@ | |||
1746 | 1 | . inc/common.sh | 1 | . inc/common.sh |
1747 | 2 | 2 | ||
1750 | 3 | init | 3 | start_server --innodb_file_per_table |
1749 | 4 | run_mysqld --innodb_file_per_table | ||
1751 | 5 | load_dbase_schema incremental_sample | 4 | load_dbase_schema incremental_sample |
1752 | 6 | 5 | ||
1753 | 7 | # Adding initial rows | 6 | # Adding initial rows |
1754 | @@ -72,7 +71,7 @@ | |||
1755 | 72 | vlog "Data prepared for restore" | 71 | vlog "Data prepared for restore" |
1756 | 73 | 72 | ||
1757 | 74 | # Destroying mysql data | 73 | # Destroying mysql data |
1759 | 75 | stop_mysqld | 74 | stop_server |
1760 | 76 | rm -rf $mysql_datadir/* | 75 | rm -rf $mysql_datadir/* |
1761 | 77 | vlog "Data destroyed" | 76 | vlog "Data destroyed" |
1762 | 78 | 77 | ||
1763 | @@ -84,7 +83,7 @@ | |||
1764 | 84 | innobackupex --copy-back $full_backup_dir | 83 | innobackupex --copy-back $full_backup_dir |
1765 | 85 | vlog "Data restored" | 84 | vlog "Data restored" |
1766 | 86 | 85 | ||
1768 | 87 | run_mysqld --innodb_file_per_table | 86 | start_server --innodb_file_per_table |
1769 | 88 | 87 | ||
1770 | 89 | vlog "Checking checksums" | 88 | vlog "Checking checksums" |
1771 | 90 | checksum_b=`checksum_table incremental_sample test` | 89 | checksum_b=`checksum_table incremental_sample test` |
1772 | 91 | 90 | ||
1773 | === modified file 'test/t/ib_lru_dump_basic.sh' | |||
1774 | --- test/t/ib_lru_dump_basic.sh 2012-02-06 10:53:43 +0000 | |||
1775 | +++ test/t/ib_lru_dump_basic.sh 2012-06-12 10:40:23 +0000 | |||
1776 | @@ -9,8 +9,7 @@ | |||
1777 | 9 | exit $SKIPPED_EXIT_CODE | 9 | exit $SKIPPED_EXIT_CODE |
1778 | 10 | fi | 10 | fi |
1779 | 11 | 11 | ||
1782 | 12 | init | 12 | start_server |
1781 | 13 | run_mysqld | ||
1783 | 14 | 13 | ||
1784 | 15 | # produce ib_lru_dump | 14 | # produce ib_lru_dump |
1785 | 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*/;" |
1786 | 17 | 16 | ||
1787 | === modified file 'test/t/ib_lru_dump_rsync.sh' | |||
1788 | --- test/t/ib_lru_dump_rsync.sh 2012-02-06 10:53:43 +0000 | |||
1789 | +++ test/t/ib_lru_dump_rsync.sh 2012-06-12 10:40:23 +0000 | |||
1790 | @@ -14,8 +14,7 @@ | |||
1791 | 14 | exit $SKIPPED_EXIT_CODE | 14 | exit $SKIPPED_EXIT_CODE |
1792 | 15 | fi | 15 | fi |
1793 | 16 | 16 | ||
1796 | 17 | init | 17 | start_server |
1795 | 18 | run_mysqld | ||
1797 | 19 | 18 | ||
1798 | 20 | # produce ib_lru_dump | 19 | # produce ib_lru_dump |
1799 | 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*/;" |
1800 | 22 | 21 | ||
1801 | === modified file 'test/t/ib_lru_dump_stream.sh' | |||
1802 | --- test/t/ib_lru_dump_stream.sh 2012-02-06 10:53:43 +0000 | |||
1803 | +++ test/t/ib_lru_dump_stream.sh 2012-06-12 10:40:23 +0000 | |||
1804 | @@ -9,8 +9,7 @@ | |||
1805 | 9 | exit $SKIPPED_EXIT_CODE | 9 | exit $SKIPPED_EXIT_CODE |
1806 | 10 | fi | 10 | fi |
1807 | 11 | 11 | ||
1810 | 12 | init | 12 | start_server |
1809 | 13 | run_mysqld | ||
1811 | 14 | 13 | ||
1812 | 15 | # produce ib_lru_dump | 14 | # produce ib_lru_dump |
1813 | 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*/;" |
1814 | 17 | 16 | ||
1815 | === modified file 'test/t/ib_rsync.sh' | |||
1816 | --- test/t/ib_rsync.sh 2011-11-15 13:01:05 +0000 | |||
1817 | +++ test/t/ib_rsync.sh 2012-06-12 10:40:23 +0000 | |||
1818 | @@ -6,13 +6,12 @@ | |||
1819 | 6 | exit $SKIPPED_EXIT_CODE | 6 | exit $SKIPPED_EXIT_CODE |
1820 | 7 | fi | 7 | fi |
1821 | 8 | 8 | ||
1824 | 9 | init | 9 | start_server --innodb_file_per_table |
1823 | 10 | run_mysqld --innodb_file_per_table | ||
1825 | 11 | load_sakila | 10 | load_sakila |
1826 | 12 | 11 | ||
1827 | 13 | innobackupex --rsync --no-timestamp $topdir/backup | 12 | innobackupex --rsync --no-timestamp $topdir/backup |
1828 | 14 | 13 | ||
1830 | 15 | stop_mysqld | 14 | stop_server |
1831 | 16 | 15 | ||
1832 | 17 | run_cmd rm -r $mysql_datadir | 16 | run_cmd rm -r $mysql_datadir |
1833 | 18 | 17 | ||
1834 | @@ -22,5 +21,5 @@ | |||
1835 | 22 | 21 | ||
1836 | 23 | innobackupex --copy-back $topdir/backup | 22 | innobackupex --copy-back $topdir/backup |
1837 | 24 | 23 | ||
1839 | 25 | run_mysqld | 24 | start_server |
1840 | 26 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT COUNT(*) FROM actor" sakila | 25 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT COUNT(*) FROM actor" sakila |
1841 | 27 | 26 | ||
1842 | === modified file 'test/t/ib_slave_info.sh' | |||
1843 | --- test/t/ib_slave_info.sh 2011-08-29 19:54:47 +0000 | |||
1844 | +++ test/t/ib_slave_info.sh 2012-06-12 10:40:23 +0000 | |||
1845 | @@ -1,7 +1,14 @@ | |||
1846 | 1 | . inc/common.sh | 1 | . inc/common.sh |
1847 | 2 | 2 | ||
1850 | 3 | init | 3 | master_id=1 |
1851 | 4 | run_mysqld --innodb_file_per_table | 4 | slave_id=2 |
1852 | 5 | |||
1853 | 6 | start_server_with_id $master_id | ||
1854 | 7 | start_server_with_id $slave_id | ||
1855 | 8 | |||
1856 | 9 | setup_slave $slave_id $master_id | ||
1857 | 10 | |||
1858 | 11 | switch_server $master_id | ||
1859 | 5 | load_dbase_schema incremental_sample | 12 | load_dbase_schema incremental_sample |
1860 | 6 | 13 | ||
1861 | 7 | # Adding initial rows | 14 | # Adding initial rows |
1862 | @@ -15,11 +22,15 @@ | |||
1863 | 15 | done | 22 | done |
1864 | 16 | vlog "Initial rows added" | 23 | vlog "Initial rows added" |
1865 | 17 | 24 | ||
1869 | 18 | # Full backup | 25 | # Full backup of the slave server |
1870 | 19 | # backup root directory | 26 | switch_server $slave_id |
1868 | 20 | mkdir -p $topdir/backup | ||
1871 | 21 | 27 | ||
1872 | 22 | vlog "Check that --slave-info with --no-lock and no --safe-slave-backup fails" | 28 | vlog "Check that --slave-info with --no-lock and no --safe-slave-backup fails" |
1874 | 23 | run_cmd_expect_failure $IB_BIN $IB_ARGS --slave-info --no-lock $topdir/backup | 29 | run_cmd_expect_failure $IB_BIN $IB_ARGS --no-timestamp --slave-info --no-lock \ |
1875 | 30 | $topdir/backup | ||
1876 | 24 | 31 | ||
1878 | 25 | # TODO: add positive tests when the test suite is able to setup replication | 32 | innobackupex --no-timestamp --slave-info $topdir/backup |
1879 | 33 | egrep -q '^mysql-bin.000001[[:space:]]+[0-9]+[[:space:]]+$' \ | ||
1880 | 34 | $topdir/backup/xtrabackup_binlog_info | ||
1881 | 35 | egrep -q '^CHANGE MASTER TO MASTER_LOG_FILE='\''mysql-bin.000001'\'', MASTER_LOG_POS=[0-9]+$' \ | ||
1882 | 36 | $topdir/backup/xtrabackup_slave_info | ||
1883 | 26 | 37 | ||
1884 | === modified file 'test/t/ib_specialchar.sh' | |||
1885 | --- test/t/ib_specialchar.sh 2012-02-02 20:35:45 +0000 | |||
1886 | +++ test/t/ib_specialchar.sh 2012-06-12 10:40:23 +0000 | |||
1887 | @@ -1,7 +1,7 @@ | |||
1888 | 1 | . inc/common.sh | 1 | . inc/common.sh |
1889 | 2 | 2 | ||
1892 | 3 | init | 3 | start_server |
1893 | 4 | run_mysqld | 4 | |
1894 | 5 | load_dbase_schema sakila | 5 | load_dbase_schema sakila |
1895 | 6 | load_dbase_data sakila | 6 | load_dbase_data sakila |
1896 | 7 | 7 | ||
1897 | @@ -20,7 +20,7 @@ | |||
1898 | 20 | run_cmd ${MYSQLADMIN} ${MYSQL_ARGS} -p'$PASSWD' password '' | 20 | run_cmd ${MYSQLADMIN} ${MYSQL_ARGS} -p'$PASSWD' password '' |
1899 | 21 | 21 | ||
1900 | 22 | vlog "Stopping database server" | 22 | vlog "Stopping database server" |
1902 | 23 | stop_mysqld | 23 | stop_server |
1903 | 24 | # Remove datadir | 24 | # Remove datadir |
1904 | 25 | vlog "Removing data folder" | 25 | vlog "Removing data folder" |
1905 | 26 | rm -r $mysql_datadir | 26 | rm -r $mysql_datadir |
1906 | @@ -40,7 +40,7 @@ | |||
1907 | 40 | 40 | ||
1908 | 41 | vlog "Starting database server" | 41 | vlog "Starting database server" |
1909 | 42 | # using --skip-grant-tables to override root password restored from backup | 42 | # using --skip-grant-tables to override root password restored from backup |
1911 | 43 | run_mysqld --skip-grant-tables | 43 | start_server --skip-grant-tables |
1912 | 44 | vlog "Database server started" | 44 | vlog "Database server started" |
1913 | 45 | # Check sakila | 45 | # Check sakila |
1914 | 46 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila | 46 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila |
1915 | 47 | 47 | ||
1916 | === modified file 'test/t/ib_stream_incremental.sh' | |||
1917 | --- test/t/ib_stream_incremental.sh 2012-05-15 16:53:07 +0000 | |||
1918 | +++ test/t/ib_stream_incremental.sh 2012-06-12 10:40:23 +0000 | |||
1919 | @@ -18,8 +18,7 @@ | |||
1920 | 18 | vlog "Testing a streaming incremental backup with the '$stream_format' format" | 18 | vlog "Testing a streaming incremental backup with the '$stream_format' format" |
1921 | 19 | vlog "************************************************************************" | 19 | vlog "************************************************************************" |
1922 | 20 | 20 | ||
1925 | 21 | init | 21 | start_server |
1924 | 22 | run_mysqld --innodb_file_per_table | ||
1926 | 23 | load_dbase_schema incremental_sample | 22 | load_dbase_schema incremental_sample |
1927 | 24 | 23 | ||
1928 | 25 | # Adding initial rows | 24 | # Adding initial rows |
1929 | @@ -79,7 +78,7 @@ | |||
1930 | 79 | vlog "Data prepared for restore" | 78 | vlog "Data prepared for restore" |
1931 | 80 | 79 | ||
1932 | 81 | # Destroying mysql data | 80 | # Destroying mysql data |
1934 | 82 | stop_mysqld | 81 | stop_server |
1935 | 83 | rm -rf $mysql_datadir/* | 82 | rm -rf $mysql_datadir/* |
1936 | 84 | vlog "Data destroyed" | 83 | vlog "Data destroyed" |
1937 | 85 | 84 | ||
1938 | @@ -88,7 +87,7 @@ | |||
1939 | 88 | innobackupex --copy-back $full_backup_dir | 87 | innobackupex --copy-back $full_backup_dir |
1940 | 89 | vlog "Data restored" | 88 | vlog "Data restored" |
1941 | 90 | 89 | ||
1943 | 91 | run_mysqld --innodb_file_per_table | 90 | start_server --innodb_file_per_table |
1944 | 92 | 91 | ||
1945 | 93 | vlog "Checking checksums" | 92 | vlog "Checking checksums" |
1946 | 94 | checksum_b=`checksum_table incremental_sample test` | 93 | checksum_b=`checksum_table incremental_sample test` |
1947 | 95 | 94 | ||
1948 | === modified file 'test/t/tar4ibd_symlink.sh' | |||
1949 | --- test/t/tar4ibd_symlink.sh 2012-02-10 20:05:56 +0000 | |||
1950 | +++ test/t/tar4ibd_symlink.sh 2012-06-12 10:40:23 +0000 | |||
1951 | @@ -4,37 +4,41 @@ | |||
1952 | 4 | 4 | ||
1953 | 5 | . inc/common.sh | 5 | . inc/common.sh |
1954 | 6 | 6 | ||
1957 | 7 | init | 7 | start_server --innodb_file_per_table |
1958 | 8 | run_mysqld --innodb_file_per_table | 8 | |
1959 | 9 | load_dbase_schema sakila | 9 | load_dbase_schema sakila |
1960 | 10 | load_dbase_data sakila | 10 | load_dbase_data sakila |
1961 | 11 | 11 | ||
1962 | 12 | # Force a checkpoint | ||
1963 | 13 | stop_server | ||
1964 | 14 | start_server | ||
1965 | 15 | |||
1966 | 12 | # Copy some .ibd files to a temporary location and replace them with symlinks | 16 | # Copy some .ibd files to a temporary location and replace them with symlinks |
1967 | 13 | 17 | ||
1970 | 14 | mv $topdir/mysql/sakila/actor.ibd $topdir | 18 | mv $MYSQLD_DATADIR/sakila/actor.ibd $MYSQLD_VARDIR/ |
1971 | 15 | ln -s $topdir/actor.ibd $topdir/mysql/sakila | 19 | ln -s $MYSQLD_VARDIR/actor.ibd $MYSQLD_DATADIR/sakila/actor.ibd |
1972 | 16 | 20 | ||
1976 | 17 | mv $topdir/mysql/sakila/customer.ibd $topdir | 21 | mv $MYSQLD_DATADIR/sakila/customer.ibd $MYSQLD_VARDIR/customer.ibd |
1977 | 18 | ln -s $topdir/customer.ibd $topdir/customer_link.ibd | 22 | ln -s $MYSQLD_VARDIR/customer.ibd $MYSQLD_VARDIR/customer_link.ibd |
1978 | 19 | ln -s $topdir/customer_link.ibd $topdir/mysql/sakila/customer.ibd | 23 | ln -s $MYSQLD_VARDIR/customer_link.ibd $MYSQLD_DATADIR/sakila/customer.ibd |
1979 | 20 | 24 | ||
1980 | 21 | # Take backup | 25 | # Take backup |
1983 | 22 | mkdir -p $topdir/backup | 26 | mkdir -p $MYSQLD_VARDIR/backup |
1984 | 23 | innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar | 27 | innobackupex --stream=tar $MYSQLD_VARDIR/backup > $MYSQLD_VARDIR/backup/out.tar |
1985 | 24 | 28 | ||
1987 | 25 | stop_mysqld | 29 | stop_server |
1988 | 26 | 30 | ||
1989 | 27 | # Remove datadir | 31 | # Remove datadir |
1990 | 28 | rm -r $mysql_datadir | 32 | rm -r $mysql_datadir |
1991 | 29 | 33 | ||
1992 | 30 | # Remove the temporary files referenced by symlinks | 34 | # Remove the temporary files referenced by symlinks |
1996 | 31 | rm -f $topdir/actor.ibd | 35 | rm -f $MYSQLD_VARDIR/actor.ibd |
1997 | 32 | rm -f $topdir/customer.ibd | 36 | rm -f $MYSQLD_VARDIR/customer.ibd |
1998 | 33 | rm -f $topdir/customer_link.ibd | 37 | rm -f $MYSQLD_VARDIR/customer_link.ibd |
1999 | 34 | 38 | ||
2000 | 35 | # Restore sakila | 39 | # Restore sakila |
2001 | 36 | vlog "Applying log" | 40 | vlog "Applying log" |
2003 | 37 | backup_dir=$topdir/backup | 41 | backup_dir=$MYSQLD_VARDIR/backup |
2004 | 38 | cd $backup_dir | 42 | cd $backup_dir |
2005 | 39 | run_cmd $TAR -ixvf out.tar | 43 | run_cmd $TAR -ixvf out.tar |
2006 | 40 | cd - >/dev/null 2>&1 | 44 | cd - >/dev/null 2>&1 |
2007 | @@ -46,7 +50,7 @@ | |||
2008 | 46 | 50 | ||
2009 | 47 | innobackupex --copy-back $backup_dir | 51 | innobackupex --copy-back $backup_dir |
2010 | 48 | 52 | ||
2012 | 49 | run_mysqld | 53 | start_server |
2013 | 50 | 54 | ||
2014 | 51 | # Check sakila | 55 | # Check sakila |
2015 | 52 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT COUNT(*) FROM actor" sakila | 56 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT COUNT(*) FROM actor" sakila |
2016 | 53 | 57 | ||
2017 | === modified file 'test/t/xb_basic.sh' | |||
2018 | --- test/t/xb_basic.sh 2012-02-02 20:35:45 +0000 | |||
2019 | +++ test/t/xb_basic.sh 2012-06-12 10:40:23 +0000 | |||
2020 | @@ -1,16 +1,16 @@ | |||
2021 | 1 | . inc/common.sh | 1 | . inc/common.sh |
2022 | 2 | 2 | ||
2025 | 3 | init | 3 | start_server |
2026 | 4 | run_mysqld | 4 | |
2027 | 5 | load_dbase_schema sakila | 5 | load_dbase_schema sakila |
2028 | 6 | load_dbase_data sakila | 6 | load_dbase_data sakila |
2029 | 7 | 7 | ||
2030 | 8 | mkdir -p $topdir/backup | 8 | mkdir -p $topdir/backup |
2032 | 9 | innobackupex $topdir/backup | 9 | innobackupex $topdir/backup |
2033 | 10 | backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'` | 10 | backup_dir=`grep "innobackupex: Backup created in directory" $OUTFILE | awk -F\' '{ print $2}'` |
2034 | 11 | vlog "Backup created in directory $backup_dir" | 11 | vlog "Backup created in directory $backup_dir" |
2035 | 12 | 12 | ||
2037 | 13 | stop_mysqld | 13 | stop_server |
2038 | 14 | # Remove datadir | 14 | # Remove datadir |
2039 | 15 | rm -r $mysql_datadir | 15 | rm -r $mysql_datadir |
2040 | 16 | #init_mysql_dir | 16 | #init_mysql_dir |
2041 | @@ -27,6 +27,6 @@ | |||
2042 | 27 | vlog "###########" | 27 | vlog "###########" |
2043 | 28 | innobackupex --copy-back $backup_dir | 28 | innobackupex --copy-back $backup_dir |
2044 | 29 | 29 | ||
2046 | 30 | run_mysqld | 30 | start_server |
2047 | 31 | # Check sakila | 31 | # Check sakila |
2048 | 32 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila | 32 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila |
2049 | 33 | 33 | ||
2050 | === modified file 'test/t/xb_defaults_file.sh' | |||
2051 | --- test/t/xb_defaults_file.sh 2011-06-21 01:22:59 +0000 | |||
2052 | +++ test/t/xb_defaults_file.sh 2012-06-12 10:40:23 +0000 | |||
2053 | @@ -6,8 +6,7 @@ | |||
2054 | 6 | 6 | ||
2055 | 7 | . inc/common.sh | 7 | . inc/common.sh |
2056 | 8 | 8 | ||
2059 | 9 | init | 9 | start_server |
2058 | 10 | run_mysqld | ||
2060 | 11 | 10 | ||
2061 | 12 | # The following should succeed (can't use xtrabackup directly as it uses | 11 | # The following should succeed (can't use xtrabackup directly as it uses |
2062 | 13 | # --no-defaults) | 12 | # --no-defaults) |
2063 | 14 | 13 | ||
2064 | === modified file 'test/t/xb_export.sh' | |||
2065 | --- test/t/xb_export.sh 2012-02-02 20:35:45 +0000 | |||
2066 | +++ test/t/xb_export.sh 2012-06-12 10:40:23 +0000 | |||
2067 | @@ -1,11 +1,5 @@ | |||
2068 | 1 | . inc/common.sh | 1 | . inc/common.sh |
2069 | 2 | 2 | ||
2070 | 3 | init | ||
2071 | 4 | |||
2072 | 5 | backup_dir=$topdir/xb_export_backup | ||
2073 | 6 | rm -rf $backup_dir | ||
2074 | 7 | mkdir $backup_dir | ||
2075 | 8 | |||
2076 | 9 | if [ -z "$XTRADB_VERSION" ]; then | 3 | if [ -z "$XTRADB_VERSION" ]; then |
2077 | 10 | echo "Requires XtraDB" > $SKIPPED_REASON | 4 | echo "Requires XtraDB" > $SKIPPED_REASON |
2078 | 11 | exit $SKIPPED_EXIT_CODE | 5 | exit $SKIPPED_EXIT_CODE |
2079 | @@ -18,11 +12,15 @@ | |||
2080 | 18 | import_option="--innodb_expand_import=1" | 12 | import_option="--innodb_expand_import=1" |
2081 | 19 | fi | 13 | fi |
2082 | 20 | 14 | ||
2084 | 21 | MYSQLD_ARGS="$MYSQLD_ARGS --innodb_file_per_table $import_option \ | 15 | mysql_extra_args="--innodb_file_per_table $import_option \ |
2085 | 22 | --innodb_file_format=Barracuda" | 16 | --innodb_file_format=Barracuda" |
2086 | 23 | 17 | ||
2087 | 24 | # Starting database server | 18 | # Starting database server |
2089 | 25 | run_mysqld | 19 | start_server $mysql_extra_args |
2090 | 20 | |||
2091 | 21 | backup_dir=$topdir/xb_export_backup | ||
2092 | 22 | rm -rf $backup_dir | ||
2093 | 23 | mkdir $backup_dir | ||
2094 | 26 | 24 | ||
2095 | 27 | # Loading table schema | 25 | # Loading table schema |
2096 | 28 | load_dbase_schema incremental_sample | 26 | load_dbase_schema incremental_sample |
2097 | @@ -48,10 +46,9 @@ | |||
2098 | 48 | vlog "Table was backed up" | 46 | vlog "Table was backed up" |
2099 | 49 | 47 | ||
2100 | 50 | vlog "Re-initializing database server" | 48 | vlog "Re-initializing database server" |
2105 | 51 | stop_mysqld | 49 | stop_server |
2106 | 52 | # Can't use clean/init because that will remove $backup_dir as well | 50 | rm -rf ${MYSQLD_DATADIR} |
2107 | 53 | clean_datadir | 51 | start_server $mysql_extra_args |
2104 | 54 | run_mysqld | ||
2108 | 55 | load_dbase_schema incremental_sample | 52 | load_dbase_schema incremental_sample |
2109 | 56 | vlog "Database was re-initialized" | 53 | vlog "Database was re-initialized" |
2110 | 57 | 54 | ||
2111 | @@ -91,8 +88,8 @@ | |||
2112 | 91 | # consistent backup results. Otherwise we risk ending up with no test.ibd | 88 | # consistent backup results. Otherwise we risk ending up with no test.ibd |
2113 | 92 | # in the backup in case importing has not finished before taking backup | 89 | # in the backup in case importing has not finished before taking backup |
2114 | 93 | 90 | ||
2117 | 94 | stop_mysqld | 91 | stop_server |
2118 | 95 | run_mysqld | 92 | start_server $mysql_extra_args |
2119 | 96 | 93 | ||
2120 | 97 | # Some testing queries | 94 | # Some testing queries |
2121 | 98 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "select count(*) from test;" incremental_sample | 95 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "select count(*) from test;" incremental_sample |
2122 | @@ -111,13 +108,13 @@ | |||
2123 | 111 | 108 | ||
2124 | 112 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "delete from test;" incremental_sample | 109 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "delete from test;" incremental_sample |
2125 | 113 | 110 | ||
2127 | 114 | stop_mysqld | 111 | stop_server |
2128 | 115 | 112 | ||
2129 | 116 | cd $topdir/backup/full | 113 | cd $topdir/backup/full |
2130 | 117 | cp -r * $mysql_datadir | 114 | cp -r * $mysql_datadir |
2131 | 118 | cd - | 115 | cd - |
2132 | 119 | 116 | ||
2134 | 120 | run_mysqld | 117 | start_server $mysql_extra_args |
2135 | 121 | 118 | ||
2136 | 122 | vlog "Cheking checksums" | 119 | vlog "Cheking checksums" |
2137 | 123 | checksum_3=`checksum_table incremental_sample test` | 120 | checksum_3=`checksum_table incremental_sample test` |
2138 | @@ -131,6 +128,6 @@ | |||
2139 | 131 | 128 | ||
2140 | 132 | vlog "Checksums are OK" | 129 | vlog "Checksums are OK" |
2141 | 133 | 130 | ||
2143 | 134 | stop_mysqld | 131 | stop_server |
2144 | 135 | 132 | ||
2145 | 136 | rm -rf $backup_dir | 133 | rm -rf $backup_dir |
2146 | 137 | 134 | ||
2147 | === modified file 'test/t/xb_galera_info.sh' | |||
2148 | --- test/t/xb_galera_info.sh 2012-02-02 20:13:09 +0000 | |||
2149 | +++ test/t/xb_galera_info.sh 2012-06-12 10:40:23 +0000 | |||
2150 | @@ -12,8 +12,7 @@ | |||
2151 | 12 | fi | 12 | fi |
2152 | 13 | set -e | 13 | set -e |
2153 | 14 | 14 | ||
2156 | 15 | init | 15 | start_server --log-bin=`hostname`-bin --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/libgalera_smm.so --wsrep_cluster_address=gcomm:// |
2155 | 16 | run_mysqld --log-bin=`hostname`-bin --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/libgalera_smm.so --wsrep_cluster_address=gcomm:// | ||
2157 | 17 | 16 | ||
2158 | 18 | innobackupex --no-timestamp --galera-info $topdir/backup | 17 | innobackupex --no-timestamp --galera-info $topdir/backup |
2159 | 19 | backup_dir=$topdir/backup | 18 | backup_dir=$topdir/backup |
2160 | @@ -26,4 +25,4 @@ | |||
2161 | 26 | exit 1 | 25 | exit 1 |
2162 | 27 | fi | 26 | fi |
2163 | 28 | 27 | ||
2165 | 29 | stop_mysqld | 28 | stop_server |
2166 | 30 | 29 | ||
2167 | === modified file 'test/t/xb_incremental.sh' | |||
2168 | --- test/t/xb_incremental.sh 2012-02-02 20:35:45 +0000 | |||
2169 | +++ test/t/xb_incremental.sh 2012-06-12 10:40:23 +0000 | |||
2170 | @@ -1,7 +1,7 @@ | |||
2171 | 1 | . inc/common.sh | 1 | . inc/common.sh |
2172 | 2 | 2 | ||
2175 | 3 | init | 3 | start_server --innodb_file_per_table |
2176 | 4 | run_mysqld --innodb_file_per_table | 4 | |
2177 | 5 | load_dbase_schema incremental_sample | 5 | load_dbase_schema incremental_sample |
2178 | 6 | 6 | ||
2179 | 7 | # Adding 10k rows | 7 | # Adding 10k rows |
2180 | @@ -73,14 +73,14 @@ | |||
2181 | 73 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "delete from test;" incremental_sample | 73 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "delete from test;" incremental_sample |
2182 | 74 | 74 | ||
2183 | 75 | # Restore backup | 75 | # Restore backup |
2185 | 76 | stop_mysqld | 76 | stop_server |
2186 | 77 | vlog "Copying files" | 77 | vlog "Copying files" |
2187 | 78 | cd $topdir/data/full/ | 78 | cd $topdir/data/full/ |
2188 | 79 | cp -r * $mysql_datadir | 79 | cp -r * $mysql_datadir |
2189 | 80 | cd $topdir | 80 | cd $topdir |
2190 | 81 | 81 | ||
2191 | 82 | vlog "Data restored" | 82 | vlog "Data restored" |
2193 | 83 | run_mysqld --innodb_file_per_table | 83 | start_server --innodb_file_per_table |
2194 | 84 | 84 | ||
2195 | 85 | vlog "Checking checksums" | 85 | vlog "Checking checksums" |
2196 | 86 | checksum_b=`checksum_table incremental_sample test` | 86 | checksum_b=`checksum_table incremental_sample test` |
2197 | 87 | 87 | ||
2198 | === modified file 'test/t/xb_incremental_compressed.sh' | |||
2199 | --- test/t/xb_incremental_compressed.sh 2012-02-10 20:05:56 +0000 | |||
2200 | +++ test/t/xb_incremental_compressed.sh 2012-06-12 10:40:23 +0000 | |||
2201 | @@ -4,8 +4,6 @@ | |||
2202 | 4 | 4 | ||
2203 | 5 | . inc/common.sh | 5 | . inc/common.sh |
2204 | 6 | 6 | ||
2205 | 7 | init | ||
2206 | 8 | |||
2207 | 9 | if [ -z "$INNODB_VERSION" ]; then | 7 | if [ -z "$INNODB_VERSION" ]; then |
2208 | 10 | echo "Requires InnoDB plugin or XtraDB" >$SKIPPED_REASON | 8 | echo "Requires InnoDB plugin or XtraDB" >$SKIPPED_REASON |
2209 | 11 | exit $SKIPPED_EXIT_CODE | 9 | exit $SKIPPED_EXIT_CODE |
2210 | @@ -27,7 +25,7 @@ | |||
2211 | 27 | mysqld_additional_args="--innodb_strict_mode --innodb_file_per_table \ | 25 | mysqld_additional_args="--innodb_strict_mode --innodb_file_per_table \ |
2212 | 28 | --innodb_file_format=Barracuda" | 26 | --innodb_file_format=Barracuda" |
2213 | 29 | 27 | ||
2215 | 30 | run_mysqld ${mysqld_additional_args} | 28 | start_server ${mysqld_additional_args} |
2216 | 31 | 29 | ||
2217 | 32 | load_dbase_schema incremental_sample | 30 | load_dbase_schema incremental_sample |
2218 | 33 | 31 | ||
2219 | @@ -134,7 +132,7 @@ | |||
2220 | 134 | 132 | ||
2221 | 135 | # Restore backup | 133 | # Restore backup |
2222 | 136 | 134 | ||
2224 | 137 | stop_mysqld | 135 | stop_server |
2225 | 138 | 136 | ||
2226 | 139 | vlog "Copying files" | 137 | vlog "Copying files" |
2227 | 140 | 138 | ||
2228 | @@ -144,7 +142,7 @@ | |||
2229 | 144 | 142 | ||
2230 | 145 | vlog "Data restored" | 143 | vlog "Data restored" |
2231 | 146 | 144 | ||
2233 | 147 | run_mysqld ${mysqld_additional_args} | 145 | start_server ${mysqld_additional_args} |
2234 | 148 | 146 | ||
2235 | 149 | vlog "Cheking checksums" | 147 | vlog "Cheking checksums" |
2236 | 150 | checksum_b=`checksum_table incremental_sample test` | 148 | checksum_b=`checksum_table incremental_sample test` |
2237 | @@ -156,10 +154,11 @@ | |||
2238 | 156 | fi | 154 | fi |
2239 | 157 | 155 | ||
2240 | 158 | vlog "Checksums are OK" | 156 | vlog "Checksums are OK" |
2241 | 157 | |||
2242 | 158 | stop_server | ||
2243 | 159 | } | 159 | } |
2244 | 160 | 160 | ||
2245 | 161 | for page_size in 1 2 4 8 16; do | 161 | for page_size in 1 2 4 8 16; do |
2246 | 162 | init | ||
2247 | 163 | test_incremental_compressed ${page_size} | 162 | test_incremental_compressed ${page_size} |
2248 | 164 | clean | 163 | clean |
2249 | 165 | done | 164 | done |
2250 | 166 | 165 | ||
2251 | === modified file 'test/t/xb_log_overwrap.sh' | |||
2252 | --- test/t/xb_log_overwrap.sh 2011-07-04 19:38:26 +0000 | |||
2253 | +++ test/t/xb_log_overwrap.sh 2012-06-12 10:40:23 +0000 | |||
2254 | @@ -1,7 +1,7 @@ | |||
2255 | 1 | . inc/common.sh | 1 | . inc/common.sh |
2256 | 2 | 2 | ||
2259 | 3 | init | 3 | start_server --innodb_log_file_size=1M --innodb_thread_concurrency=1 |
2260 | 4 | run_mysqld --innodb_log_file_size=1M --innodb_thread_concurrency=1 | 4 | |
2261 | 5 | load_dbase_schema sakila | 5 | load_dbase_schema sakila |
2262 | 6 | load_dbase_data sakila | 6 | load_dbase_data sakila |
2263 | 7 | mkdir $topdir/backup | 7 | mkdir $topdir/backup |
2264 | 8 | 8 | ||
2265 | === modified file 'test/t/xb_parallel.sh' | |||
2266 | --- test/t/xb_parallel.sh 2012-02-02 20:35:45 +0000 | |||
2267 | +++ test/t/xb_parallel.sh 2012-06-12 10:40:23 +0000 | |||
2268 | @@ -1,7 +1,7 @@ | |||
2269 | 1 | . inc/common.sh | 1 | . inc/common.sh |
2270 | 2 | 2 | ||
2273 | 3 | init | 3 | start_server --innodb_file_per_table |
2274 | 4 | run_mysqld --innodb_file_per_table | 4 | |
2275 | 5 | load_dbase_schema sakila | 5 | load_dbase_schema sakila |
2276 | 6 | load_dbase_data sakila | 6 | load_dbase_data sakila |
2277 | 7 | 7 | ||
2278 | @@ -13,7 +13,7 @@ | |||
2279 | 13 | 13 | ||
2280 | 14 | #echo "Backup dir in $backup_dir" | 14 | #echo "Backup dir in $backup_dir" |
2281 | 15 | 15 | ||
2283 | 16 | stop_mysqld | 16 | stop_server |
2284 | 17 | # Remove datadir | 17 | # Remove datadir |
2285 | 18 | rm -r $mysql_datadir | 18 | rm -r $mysql_datadir |
2286 | 19 | # Restore sakila | 19 | # Restore sakila |
2287 | @@ -29,6 +29,6 @@ | |||
2288 | 29 | vlog "###########" | 29 | vlog "###########" |
2289 | 30 | innobackupex --copy-back $backup_dir | 30 | innobackupex --copy-back $backup_dir |
2290 | 31 | 31 | ||
2292 | 32 | run_mysqld | 32 | start_server |
2293 | 33 | # Check sakila | 33 | # Check sakila |
2294 | 34 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila | 34 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila |
2295 | 35 | 35 | ||
2296 | === modified file 'test/t/xb_parallel_incremental.sh' | |||
2297 | --- test/t/xb_parallel_incremental.sh 2012-02-02 20:35:45 +0000 | |||
2298 | +++ test/t/xb_parallel_incremental.sh 2012-06-12 10:40:23 +0000 | |||
2299 | @@ -4,8 +4,8 @@ | |||
2300 | 4 | 4 | ||
2301 | 5 | . inc/common.sh | 5 | . inc/common.sh |
2302 | 6 | 6 | ||
2305 | 7 | init | 7 | start_server --innodb_file_per_table |
2306 | 8 | run_mysqld --innodb_file_per_table | 8 | |
2307 | 9 | load_dbase_schema sakila | 9 | load_dbase_schema sakila |
2308 | 10 | load_dbase_data sakila | 10 | load_dbase_data sakila |
2309 | 11 | 11 | ||
2310 | @@ -38,7 +38,7 @@ | |||
2311 | 38 | innobackupex --incremental --no-timestamp --parallel=8 \ | 38 | innobackupex --incremental --no-timestamp --parallel=8 \ |
2312 | 39 | --incremental-basedir=$topdir/full_backup $topdir/inc_backup | 39 | --incremental-basedir=$topdir/full_backup $topdir/inc_backup |
2313 | 40 | 40 | ||
2315 | 41 | stop_mysqld | 41 | stop_server |
2316 | 42 | # Remove datadir | 42 | # Remove datadir |
2317 | 43 | rm -r $mysql_datadir | 43 | rm -r $mysql_datadir |
2318 | 44 | 44 | ||
2319 | @@ -52,7 +52,7 @@ | |||
2320 | 52 | mkdir -p $mysql_datadir | 52 | mkdir -p $mysql_datadir |
2321 | 53 | innobackupex --copy-back $topdir/full_backup | 53 | innobackupex --copy-back $topdir/full_backup |
2322 | 54 | 54 | ||
2324 | 55 | run_mysqld | 55 | start_server |
2325 | 56 | 56 | ||
2326 | 57 | # Check sakila | 57 | # Check sakila |
2327 | 58 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila | 58 | run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila |
2328 | 59 | 59 | ||
2329 | === modified file 'test/t/xb_part_range.sh' | |||
2330 | --- test/t/xb_part_range.sh 2012-02-02 20:35:45 +0000 | |||
2331 | +++ test/t/xb_part_range.sh 2012-06-12 10:40:23 +0000 | |||
2332 | @@ -1,7 +1,6 @@ | |||
2333 | 1 | . inc/common.sh | 1 | . inc/common.sh |
2334 | 2 | 2 | ||
2337 | 3 | init | 3 | start_server |
2336 | 4 | run_mysqld | ||
2338 | 5 | 4 | ||
2339 | 6 | run_cmd $MYSQL $MYSQL_ARGS test <<EOF | 5 | run_cmd $MYSQL $MYSQL_ARGS test <<EOF |
2340 | 7 | CREATE TABLE test ( | 6 | CREATE TABLE test ( |
2341 | @@ -89,7 +88,7 @@ | |||
2342 | 89 | 88 | ||
2343 | 90 | # Restore backup | 89 | # Restore backup |
2344 | 91 | 90 | ||
2346 | 92 | stop_mysqld | 91 | stop_server |
2347 | 93 | 92 | ||
2348 | 94 | vlog "Copying files" | 93 | vlog "Copying files" |
2349 | 95 | 94 | ||
2350 | @@ -99,7 +98,7 @@ | |||
2351 | 99 | 98 | ||
2352 | 100 | vlog "Data restored" | 99 | vlog "Data restored" |
2353 | 101 | 100 | ||
2355 | 102 | run_mysqld | 101 | start_server |
2356 | 103 | 102 | ||
2357 | 104 | vlog "Cheking checksums" | 103 | vlog "Cheking checksums" |
2358 | 105 | checksum_b=`checksum_table test test` | 104 | checksum_b=`checksum_table test test` |
2359 | 106 | 105 | ||
2360 | === modified file 'test/t/xb_partial.sh' | |||
2361 | --- test/t/xb_partial.sh 2012-02-02 20:35:45 +0000 | |||
2362 | +++ test/t/xb_partial.sh 2012-06-12 10:40:23 +0000 | |||
2363 | @@ -1,7 +1,7 @@ | |||
2364 | 1 | . inc/common.sh | 1 | . inc/common.sh |
2365 | 2 | 2 | ||
2368 | 3 | init | 3 | start_server --innodb_file_per_table |
2369 | 4 | run_mysqld --innodb_file_per_table | 4 | |
2370 | 5 | load_dbase_schema incremental_sample | 5 | load_dbase_schema incremental_sample |
2371 | 6 | 6 | ||
2372 | 7 | # Adding 10k rows | 7 | # Adding 10k rows |
2373 | @@ -34,13 +34,13 @@ | |||
2374 | 34 | vlog "Table cleared" | 34 | vlog "Table cleared" |
2375 | 35 | 35 | ||
2376 | 36 | # Restore backup | 36 | # Restore backup |
2378 | 37 | stop_mysqld | 37 | stop_server |
2379 | 38 | vlog "Copying files" | 38 | vlog "Copying files" |
2380 | 39 | cd $topdir/data/parted/ | 39 | cd $topdir/data/parted/ |
2381 | 40 | cp -r * $mysql_datadir | 40 | cp -r * $mysql_datadir |
2382 | 41 | cd $topdir | 41 | cd $topdir |
2383 | 42 | vlog "Data restored" | 42 | vlog "Data restored" |
2385 | 43 | run_mysqld --innodb_file_per_table | 43 | start_server --innodb_file_per_table |
2386 | 44 | vlog "Checking checksums" | 44 | vlog "Checking checksums" |
2387 | 45 | checksum_b=`checksum_table incremental_sample test` | 45 | checksum_b=`checksum_table incremental_sample test` |
2388 | 46 | 46 | ||
2389 | 47 | 47 | ||
2390 | === modified file 'test/t/xb_perm_basic.sh' | |||
2391 | --- test/t/xb_perm_basic.sh 2012-02-02 20:35:45 +0000 | |||
2392 | +++ test/t/xb_perm_basic.sh 2012-06-12 10:40:23 +0000 | |||
2393 | @@ -1,8 +1,7 @@ | |||
2394 | 1 | # Test for fix of https://bugs.launchpad.net/percona-xtrabackup/+bug/691090 | 1 | # Test for fix of https://bugs.launchpad.net/percona-xtrabackup/+bug/691090 |
2395 | 2 | . inc/common.sh | 2 | . inc/common.sh |
2396 | 3 | 3 | ||
2399 | 4 | init | 4 | start_server |
2398 | 5 | run_mysqld | ||
2400 | 6 | 5 | ||
2401 | 7 | chmod -R 500 $mysql_datadir | 6 | chmod -R 500 $mysql_datadir |
2402 | 8 | trap "vlog restoring permissions on datadir $mysql_datadir ; \ | 7 | trap "vlog restoring permissions on datadir $mysql_datadir ; \ |
2403 | 9 | 8 | ||
2404 | === modified file 'test/t/xb_perm_stream.sh' | |||
2405 | --- test/t/xb_perm_stream.sh 2012-02-02 20:35:45 +0000 | |||
2406 | +++ test/t/xb_perm_stream.sh 2012-06-12 10:40:23 +0000 | |||
2407 | @@ -1,8 +1,7 @@ | |||
2408 | 1 | # Test for fix of https://bugs.launchpad.net/percona-xtrabackup/+bug/691090 | 1 | # Test for fix of https://bugs.launchpad.net/percona-xtrabackup/+bug/691090 |
2409 | 2 | . inc/common.sh | 2 | . inc/common.sh |
2410 | 3 | 3 | ||
2413 | 4 | init | 4 | start_server |
2412 | 5 | run_mysqld | ||
2414 | 6 | 5 | ||
2415 | 7 | # Take backup | 6 | # Take backup |
2416 | 8 | chmod -R 500 $mysql_datadir | 7 | chmod -R 500 $mysql_datadir |
2417 | 9 | 8 | ||
2418 | === modified file 'test/t/xb_stats.sh' | |||
2419 | --- test/t/xb_stats.sh 2012-02-02 20:35:45 +0000 | |||
2420 | +++ test/t/xb_stats.sh 2012-06-12 10:40:23 +0000 | |||
2421 | @@ -1,7 +1,7 @@ | |||
2422 | 1 | . inc/common.sh | 1 | . inc/common.sh |
2423 | 2 | 2 | ||
2426 | 3 | init | 3 | start_server |
2427 | 4 | run_mysqld | 4 | |
2428 | 5 | load_dbase_schema sakila | 5 | load_dbase_schema sakila |
2429 | 6 | load_dbase_data sakila | 6 | load_dbase_data sakila |
2430 | 7 | 7 |
http:// jenkins. percona. com/view/ XtraBackup/ job/percona- xtrabackup- 2.0-param/ 207/