Merge lp:~akopytov/percona-xtrabackup/bug1367377-2.2 into lp:percona-xtrabackup/2.2

Proposed by Alexey Kopytov on 2014-09-10
Status: Merged
Approved by: Alexey Kopytov on 2014-09-10
Approved revision: 5005
Merged at revision: 5005
Proposed branch: lp:~akopytov/percona-xtrabackup/bug1367377-2.2
Merge into: lp:percona-xtrabackup/2.2
Diff against target: 34 lines (+19/-0)
2 files modified
storage/innobase/xtrabackup/src/xtrabackup.cc (+6/-0)
storage/innobase/xtrabackup/test/t/bug1367377.sh (+13/-0)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/bug1367377-2.2
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve on 2014-09-10
Review via email: mp+234071@code.launchpad.net
To post a comment you must log in.
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'storage/innobase/xtrabackup/src/xtrabackup.cc'
2--- storage/innobase/xtrabackup/src/xtrabackup.cc 2014-09-09 17:09:09 +0000
3+++ storage/innobase/xtrabackup/src/xtrabackup.cc 2014-09-10 08:54:48 +0000
4@@ -6047,6 +6047,12 @@
5 if ((ho_error=handle_options(&argc, &argv, xb_long_options, get_one_option)))
6 exit(ho_error);
7
8+ if (argc != 0) {
9+ msg("xtrabackup: Error: unknown argument: '%s'\n",
10+ argv[0]);
11+ exit(EXIT_FAILURE);
12+ }
13+
14 if ((!xtrabackup_print_param) && (!xtrabackup_prepare) && (strcmp(mysql_data_home, "./") == 0)) {
15 if (!xtrabackup_print_param)
16 usage();
17
18=== added file 'storage/innobase/xtrabackup/test/t/bug1367377.sh'
19--- storage/innobase/xtrabackup/test/t/bug1367377.sh 1970-01-01 00:00:00 +0000
20+++ storage/innobase/xtrabackup/test/t/bug1367377.sh 2014-09-10 08:54:48 +0000
21@@ -0,0 +1,13 @@
22+################################################################################
23+# Bug #1367377: xtrabackup should reject unknown arguments which are not options
24+################################################################################
25+
26+start_server
27+
28+run_cmd_expect_failure $XB_BIN $XB_ARGS --backup foo
29+
30+test -d xtrabackup_backupfiles && die "Default backup directory found" || true
31+
32+run_cmd_expect_failure $XB_BIN $XB_ARGS foo --backup
33+
34+test -d xtrabackup_backupfiles && die "Default backup directory found" || true

Subscribers

People subscribed via source and target branches

to all changes: