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

Proposed by Alexey Kopytov
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 4999
Proposed branch: lp:~akopytov/percona-xtrabackup/bug1326967
Merge into: lp:percona-xtrabackup/2.2
Diff against target: 50 lines (+22/-3)
1 file modified
storage/innobase/xtrabackup/innobackupex.pl (+22/-3)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/bug1326967
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+233538@code.launchpad.net

Description of the change

    Bug #1326967: innobackupex --galera-info incompatible with MGC-10.0 -
                  part 2

    Merged a patch contributed by Nirbhay Choubey implementing the
    following changes:

    1. Since MariaDB does not provide Executed_Gtid_Set in SHOW MASTER STATUS,
    use its MariaDB equivalent, the gtid_binlog_state system variable.

    2. Since there is no MariaDB equivalent to the log_bin_basename
    variable, assume it is the same as the datadir and look for the current
    binlog file there.

http://jenkins.percona.com/view/PXB%202.2/job/percona-xtrabackup-2.2-param/187/

To post a comment you must log in.
Revision history for this message
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/innobackupex.pl'
2--- storage/innobase/xtrabackup/innobackupex.pl 2014-09-05 11:16:29 +0000
3+++ storage/innobase/xtrabackup/innobackupex.pl 2014-09-05 14:51:28 +0000
4@@ -3074,6 +3074,7 @@
5 my @info_lines = ();
6 my $state_uuid = undef;
7 my $last_committed = undef;
8+ my $gtid_exists= 0;
9
10 # When backup locks are supported by the server, we should skip creating
11 # xtrabackup_galera_info file on the backup stage, because
12@@ -3111,9 +3112,19 @@
13 get_mysql_master_status($con);
14 }
15
16- my $gtid = $con->{master_status}->{Executed_Gtid_Set} || '';
17+ if (defined($con->{master_status}->{Executed_Gtid_Set})) {
18+ # MySQL >= 5.6
19+ if ($con->{master_status}->{Executed_Gtid_Set} ne '') {
20+ $gtid_exists = 1;
21+ }
22+ } elsif (defined($con->{vars}->{gtid_binlog_state})) {
23+ # MariaDB >= 10.0
24+ if ($con->{vars}->{gtid_binlog_state}->{Value}) {
25+ $gtid_exists = 1;
26+ }
27+ }
28
29- if ($gtid) {
30+ if ($gtid_exists) {
31 my $log_bin_dir;
32 my $log_bin_file;
33
34@@ -3121,7 +3132,15 @@
35 get_mysql_master_status($con);
36
37 $log_bin_file = $con->{master_status}->{File};
38- $log_bin_dir = File::Basename::dirname($mysql{vars}->{log_bin_basename}->{Value});
39+ if (defined($con->{vars}->{log_bin_basename})) {
40+ # MySQL >= 5.6
41+ $log_bin_dir =
42+ File::Basename::dirname($con->{vars}->{log_bin_basename}->{Value});
43+ } else {
44+ # MariaDB >= 10.0
45+ # log_bin_basename does not exist in MariaDB, fallback to datadir
46+ $log_bin_dir = $con->{vars}->{datadir}->{Value};
47+ }
48
49 if (!defined($log_bin_file) || !defined($log_bin_dir)) {
50 die "Failed to get master binlog coordinates from SHOW MASTER STATUS";

Subscribers

People subscribed via source and target branches

to all changes: