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

Proposed by Sergei Glushchenko
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 761
Proposed branch: lp:~sergei.glushchenko/percona-xtrabackup/2.1-xb-bug1347698
Merge into: lp:percona-xtrabackup/2.1
Diff against target: 66 lines (+28/-1)
3 files modified
src/xtrabackup.cc (+8/-0)
test/t/bug1347698.sh (+19/-0)
test/t/bug884737.sh (+1/-1)
To merge this branch: bzr merge lp:~sergei.glushchenko/percona-xtrabackup/2.1-xb-bug1347698
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+233641@code.launchpad.net

Description of the change

Bug 1347698: log parameter on mysqld section shouldn't be read by xtrabackup

Fixed by adding dummy option --log.

http://jenkins.percona.com/view/PXB%202.1/job/percona-xtrabackup-2.1-param-new/11/

To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Sergei,

Looks good except "Ingnoed" and irrelevant comment about --parallel in the test case.

Also, thanks for fixing bug884737.sh, but I don't understand how it could pass Jenkins before the fix? I have verified that the syntax is correct in the 2.2 tree, and that the test fails for me locally in the 2.1 tree. Which looks serious. Any ideas why 2.1 succeeded in Jenkins?

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

Hi Alexey,

I fixed the typo and comment in test case. Test bug884737.sh
actually has no reason not to pass in Jenkins. xtrabackup by default
will create backup in the current directory in subdirectory
xtrabackup_backupfiles (i.e. test/xtrabackup_backupfiles). While this
test is only one doing it, it will always pass. Jenkins wipes current
directory for every new run. This test will start failing if there is
another test making backup in test/xtrabackup_backupfiles, or if you
run test suite twice with the same working directory.

http://jenkins.percona.com/view/PXB%202.1/job/percona-xtrabackup-2.1-param-new/12/

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

OK, so the problem is that xtrabackup does not reject arguments which are not prefixed with double dash. Reported as bug #1367377.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/xtrabackup.cc'
--- src/xtrabackup.cc 2014-06-24 09:58:44 +0000
+++ src/xtrabackup.cc 2014-09-09 15:36:06 +0000
@@ -184,6 +184,9 @@
184in milliseconds (default is 1 second) */184in milliseconds (default is 1 second) */
185ulint xtrabackup_log_copy_interval = 1000;185ulint xtrabackup_log_copy_interval = 1000;
186186
187/* Ignored option (--log) for MySQL option compatibility */
188char* log_ignored_opt = NULL;
189
187/* === metadata of backup === */190/* === metadata of backup === */
188#define XTRABACKUP_METADATA_FILENAME "xtrabackup_checkpoints"191#define XTRABACKUP_METADATA_FILENAME "xtrabackup_checkpoints"
189char metadata_type[30] = ""; /*[full-backuped|full-prepared|incremental]*/192char metadata_type[30] = ""; /*[full-backuped|full-prepared|incremental]*/
@@ -419,6 +422,7 @@
419 OPT_XTRA_ENCRYPT_KEY_FILE,422 OPT_XTRA_ENCRYPT_KEY_FILE,
420 OPT_XTRA_ENCRYPT_THREADS,423 OPT_XTRA_ENCRYPT_THREADS,
421 OPT_XTRA_ENCRYPT_CHUNK_SIZE,424 OPT_XTRA_ENCRYPT_CHUNK_SIZE,
425 OPT_LOG,
422 OPT_INNODB,426 OPT_INNODB,
423 OPT_INNODB_CHECKSUMS,427 OPT_INNODB_CHECKSUMS,
424 OPT_INNODB_DATA_FILE_PATH,428 OPT_INNODB_DATA_FILE_PATH,
@@ -650,6 +654,10 @@
650 (G_PTR*) &xtrabackup_encrypt_chunk_size, (G_PTR*) &xtrabackup_encrypt_chunk_size,654 (G_PTR*) &xtrabackup_encrypt_chunk_size, (G_PTR*) &xtrabackup_encrypt_chunk_size,
651 0, GET_ULL, REQUIRED_ARG, (1 << 16), 1024, ULONGLONG_MAX, 0, 0, 0},655 0, GET_ULL, REQUIRED_ARG, (1 << 16), 1024, ULONGLONG_MAX, 0, 0, 0},
652656
657 {"log", OPT_LOG, "Ignored option for MySQL option compatibility",
658 (G_PTR*) &log_ignored_opt, (G_PTR*) &log_ignored_opt, 0,
659 GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
660
653 {"innodb", OPT_INNODB, "Ignored option for MySQL option compatibility",661 {"innodb", OPT_INNODB, "Ignored option for MySQL option compatibility",
654 (G_PTR*) &innobase_ignored_opt, (G_PTR*) &innobase_ignored_opt, 0,662 (G_PTR*) &innobase_ignored_opt, (G_PTR*) &innobase_ignored_opt, 0,
655 GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},663 GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
656664
=== added file 'test/t/bug1347698.sh'
--- test/t/bug1347698.sh 1970-01-01 00:00:00 +0000
+++ test/t/bug1347698.sh 2014-09-09 15:36:06 +0000
@@ -0,0 +1,19 @@
1########################################################################
2# Bug #1347698: log parameter on mysqld section shouldn't be read by
3# xtrabackup
4########################################################################
5
6. inc/common.sh
7
8require_server_version_lower_than 5.6.0
9
10# add --log parameter to [mysqld] section of my.cnf
11MYSQLD_EXTRA_MY_CNF_OPTS="
12log=$MYSQLD_VARDIR/general.log
13"
14
15start_server
16
17vlog "Creating the backup directory: $topdir/backup"
18mkdir -p $topdir/backup
19xtrabackup --backup --target-dir=$topdir/backup
020
=== modified file 'test/t/bug884737.sh'
--- test/t/bug884737.sh 2013-07-30 09:31:12 +0000
+++ test/t/bug884737.sh 2014-09-09 15:36:06 +0000
@@ -10,4 +10,4 @@
10# Check that --parallel=<negative value> doesn't blow up10# Check that --parallel=<negative value> doesn't blow up
11vlog "Creating the backup directory: $topdir/backup"11vlog "Creating the backup directory: $topdir/backup"
12mkdir -p $topdir/backup12mkdir -p $topdir/backup
13xtrabackup --backup --parallel=-1 $topdir/backup13xtrabackup --backup --parallel=-1 --target-dir=$topdir/backup

Subscribers

People subscribed via source and target branches