Merge lp:~sergei.glushchenko/percona-xtrabackup/BT31424-2.1-xb-bug1174314 into lp:percona-xtrabackup/2.1

Proposed by Sergei Glushchenko on 2013-05-02
Status: Merged
Approved by: Alexey Kopytov on 2013-05-02
Approved revision: no longer in the source branch.
Merged at revision: 586
Proposed branch: lp:~sergei.glushchenko/percona-xtrabackup/BT31424-2.1-xb-bug1174314
Merge into: lp:percona-xtrabackup/2.1
Diff against target: 67 lines (+39/-2)
3 files modified
src/xtrabackup.cc (+5/-1)
test/t/xb_stats.sh (+1/-1)
test/t/xb_stats_datadir.sh (+33/-0)
To merge this branch: bzr merge lp:~sergei.glushchenko/percona-xtrabackup/BT31424-2.1-xb-bug1174314
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) 2013-05-02 Approve on 2013-05-02
Review via email: mp+162064@code.launchpad.net

Description of the change

To post a comment you must log in.
Alexey Kopytov (akopytov) :
review: Approve
584. By Sergei Glushchenko on 2013-05-02

Merge fix for 1174314 from 2.0 series

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/xtrabackup.cc'
2--- src/xtrabackup.cc 2013-04-29 05:46:15 +0000
3+++ src/xtrabackup.cc 2013-05-02 13:11:27 +0000
4@@ -3530,7 +3530,11 @@
5 ibool exists;
6 os_file_type_t type;
7
8- sprintf(logname, "ib_logfile%lu", (ulong) n);
9+ snprintf(logname, sizeof(logname), "%s%c%s%lu",
10+ INNODB_LOG_DIR, SRV_PATH_SEPARATOR,
11+ "ib_logfile", (ulong) n);
12+ srv_normalize_path_for_win(logname);
13+
14 if (!os_file_status(logname, &exists, &type) || !exists ||
15 type != OS_FILE_TYPE_FILE) {
16 msg("xtrabackup: Error: "
17
18=== modified file 'test/t/xb_stats.sh'
19--- test/t/xb_stats.sh 2012-10-15 16:14:59 +0000
20+++ test/t/xb_stats.sh 2013-05-02 13:11:27 +0000
21@@ -17,7 +17,7 @@
22 vlog "===> xtrabackup --stats --datadir=$topdir/backup"
23 run_cmd_expect_failure $XB_BIN $XB_ARGS --stats --datadir=$topdir/backup
24
25-if ! grep -q "Cannot find log file ib_logfile0" $OUTFILE
26+if ! grep -q "Cannot find log file" $OUTFILE
27 then
28 die "Cannot find the expected error message from xtrabackup --stats"
29 fi
30
31=== added file 'test/t/xb_stats_datadir.sh'
32--- test/t/xb_stats_datadir.sh 1970-01-01 00:00:00 +0000
33+++ test/t/xb_stats_datadir.sh 2013-05-02 13:11:27 +0000
34@@ -0,0 +1,33 @@
35+################################################################################
36+# Bug #1174314
37+# Test xtrabackup --stats with server dir
38+################################################################################
39+
40+. inc/common.sh
41+
42+mkdir ${TEST_BASEDIR}/logs
43+
44+trap "rm -rf ${TEST_BASEDIR}/logs" INT TERM EXIT
45+
46+MYSQLD_EXTRA_MY_CNF_OPTS="
47+innodb_log_group_home_dir=${TEST_BASEDIR}/logs
48+"
49+
50+start_server
51+
52+run_cmd $MYSQL $MYSQL_ARGS test <<EOF
53+CREATE TABLE t1(a INT) ENGINE=InnoDB;
54+INSERT INTO t1 VALUES (1), (2), (3);
55+EOF
56+
57+shutdown_server
58+
59+# there is inconsistency between shutdown_server and stop_server
60+# stop_server sets XB_ARGS="--no-defaults", while shutdown_server
61+# doesn't.
62+# we pass all necessary options as an arguments, so if someday this
63+# will be changed, test still will work
64+xtrabackup --stats --datadir=${MYSQLD_DATADIR} \
65+ --innodb_log_group_home_dir=${TEST_BASEDIR}/logs
66+
67+vlog "stats did not fail"

Subscribers

People subscribed via source and target branches