Merge lp:~laurynas-biveinis/percona-xtrabackup/bug528752-2.0 into lp:percona-xtrabackup/2.0

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 476
Proposed branch: lp:~laurynas-biveinis/percona-xtrabackup/bug528752-2.0
Merge into: lp:percona-xtrabackup/2.0
Diff against target: 41 lines (+12/-0)
2 files modified
src/xtrabackup.c (+6/-0)
test/t/bug528752.sh (+6/-0)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-xtrabackup/bug528752-2.0
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Sergei Glushchenko (community) Approve
Review via email: mp+127727@code.launchpad.net

This proposal supersedes a proposal from 2012-10-02.

Description of the change

Fix bug 528752 (xtrabackup does not handle innodb=force in my.cnf).

Normally XtraBackup skips unrecognized options, but in case of
--innodb the ambiguous option check kicks in.

Fixed by declaring the innodb option. Its presence/absence/value is
ignored.

Added a testcase.

Jenkins: http://jenkins.percona.com/job/percona-xtrabackup-2.0-param/264/

To post a comment you must log in.
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote : Posted in a previous version of this proposal

Laurynas,
Do we really need to start mysql server and take a backup in the testcase? Maybe just run xtrabackup --params --innodb=force would be enough?

review: Needs Fixing
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Approve G2

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

Approve G1.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/xtrabackup.c'
2--- src/xtrabackup.c 2012-09-13 10:28:54 +0000
3+++ src/xtrabackup.c 2012-10-03 11:44:24 +0000
4@@ -909,6 +909,7 @@
5 /* The default values for the following char* start-up parameters
6 are determined in innobase_init below: */
7
8+char* innobase_ignored_opt = NULL;
9 char* innobase_data_home_dir = NULL;
10 char* innobase_data_file_path = NULL;
11 char* innobase_log_group_home_dir = NULL;
12@@ -1053,6 +1054,7 @@
13 OPT_XTRA_STREAM,
14 OPT_XTRA_COMPRESS,
15 OPT_XTRA_COMPRESS_THREADS,
16+ OPT_INNODB,
17 OPT_INNODB_CHECKSUMS,
18 OPT_INNODB_DATA_FILE_PATH,
19 OPT_INNODB_DATA_HOME_DIR,
20@@ -1198,6 +1200,10 @@
21 (G_PTR*) &xtrabackup_compress_threads, (G_PTR*) &xtrabackup_compress_threads,
22 0, GET_UINT, REQUIRED_ARG, 1, 1, UINT_MAX, 0, 0, 0},
23
24+ {"innodb", OPT_INNODB, "Ignored option for MySQL option compatibility",
25+ (G_PTR*) &innobase_ignored_opt, (G_PTR*) &innobase_ignored_opt, 0,
26+ GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
27+
28 {"innodb_adaptive_hash_index", OPT_INNODB_ADAPTIVE_HASH_INDEX,
29 "Enable InnoDB adaptive hash index (enabled by default). "
30 "Disable with --skip-innodb-adaptive-hash-index.",
31
32=== added file 'test/t/bug528752.sh'
33--- test/t/bug528752.sh 1970-01-01 00:00:00 +0000
34+++ test/t/bug528752.sh 2012-10-03 11:44:24 +0000
35@@ -0,0 +1,6 @@
36+# Test for bug 528752: xtrabackup does not handle innodb=force in my.cnf
37+
38+. inc/common.sh
39+
40+# XB fails with exit code 3 when the bug is present
41+xtrabackup --print-param --innodb=force

Subscribers

People subscribed via source and target branches