Merge lp:~percona-core/percona-xtrabackup/release-2.1.2 into lp:percona-xtrabackup/2.1

Proposed by Alexey Kopytov
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 605
Proposed branch: lp:~percona-core/percona-xtrabackup/release-2.1.2
Merge into: lp:percona-xtrabackup/2.1
Diff against target: 224 lines (+108/-13)
6 files modified
VERSION (+1/-1)
innobackupex (+29/-11)
patches/innodb56.patch (+18/-0)
test/t/bug1180922.sh (+13/-0)
test/t/server_version.sh (+46/-0)
test/testrun.sh (+1/-1)
To merge this branch: bzr merge lp:~percona-core/percona-xtrabackup/release-2.1.2
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+164344@code.launchpad.net

Description of the change

Bugfixes for the 2.1.2 hotfix release.

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

OK.

Also any MPs to fix bug 11777182 and bug 1181092 / bug 1181099 for 2.0 are pre-approved.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'VERSION'
2--- VERSION 2013-05-04 18:05:46 +0000
3+++ VERSION 2013-05-17 16:01:30 +0000
4@@ -1,1 +1,1 @@
5-XTRABACKUP_VERSION=2.1.0rc1
6+XTRABACKUP_VERSION=2.1.2
7
8=== modified file 'innobackupex'
9--- innobackupex 2013-05-07 08:12:22 +0000
10+++ innobackupex 2013-05-17 16:01:30 +0000
11@@ -139,6 +139,8 @@
12 my $option_rebuild_indexes = '';
13 my $option_rebuild_threads = 0;
14
15+my $option_debug_sleep_before_unlock = '';
16+
17 my %mysql;
18 my $option_backup = '';
19
20@@ -1403,6 +1405,7 @@
21 }
22
23 if ($con{dbh} && $con{keepalives}) {
24+ $con{dbh}->do("SET SESSION wait_timeout=2147483");
25 start_keepalives(\%con);
26 }
27
28@@ -1535,8 +1538,8 @@
29 open(FILE, ">$galera_info") ||
30 Die "Failed to open file '$galera_info': $!";
31
32- print FILE $con->{status}->{wsrep_local_state_uuid}->{Value};
33- print FILE $con->{status}->{wsrep_last_committed}->{Value};
34+ print FILE $con->{status}->{wsrep_local_state_uuid}->{Value} . ":";
35+ print FILE $con->{status}->{wsrep_last_committed}->{Value} . "\n";
36
37 close(FILE);
38
39@@ -1573,7 +1576,14 @@
40 $position = $con->{slave_status}->{Exec_Master_Log_Pos};
41
42 if (!defined($master) || !defined($filename) || !defined($position)) {
43- Die "Failed to get master binlog coordinates from SHOW SLAVE STATUS";
44+ my $now = current_time();
45+
46+ print STDERR "$now $prefix Failed to get master binlog coordinates " .
47+ "from SHOW SLAVE STATUS\n";
48+ print STDERR "$now $prefix This means that the server is not a " .
49+ "replication slave. Ignoring the --slave-info option\n";
50+
51+ return;
52 }
53
54 # print slave status to a file
55@@ -1611,7 +1621,7 @@
56 mysql_query($con, "COMMIT");
57 }
58 write_binlog_info($con);
59- write_galera_info if $option_galera_info;
60+ write_galera_info($con) if $option_galera_info;
61
62 $now = current_time();
63 print STDERR "$now $prefix All tables locked and flushed to disk\n";
64@@ -1625,6 +1635,12 @@
65 sub mysql_unlockall {
66 my $con = shift;
67
68+ if ($option_debug_sleep_before_unlock) {
69+ my $now = current_time();
70+ print STDERR "$now $prefix Debug sleep for ".
71+ "$option_debug_sleep_before_unlock seconds\n";
72+ sleep $option_debug_sleep_before_unlock;
73+ }
74 mysql_query ($con, "UNLOCK TABLES");
75
76 $now = current_time();
77@@ -1976,7 +1992,9 @@
78 'safe-slave-backup-timeout=i' => \$option_safe_slave_backup_timeout,
79 'compact' => \$option_compact,
80 'rebuild-indexes' => \$option_rebuild_indexes,
81- 'rebuild-threads=i' => \$option_rebuild_threads
82+ 'rebuild-threads=i' => \$option_rebuild_threads,
83+ 'debug-sleep-before-unlock=i' =>
84+ \$option_debug_sleep_before_unlock
85 );
86
87 if (!$rcode) {
88@@ -2793,15 +2811,11 @@
89 Die "MySQL 5.0 support was removed in Percona XtraBackup 2.1. The last version to support MySQL 5.0 was Percona XtraBackup 2.0.";
90 }
91
92- if($var_version =~ m/5\.1\.\d/ && $var_innodb_version =~ m/.*/) {
93+ if($var_version =~ m/5\.1\.\d/ && !defined($var_innodb_version)) {
94 Die "Support for MySQL 5.1 with builtin InnoDB (not the plugin) was removed in Percona XtraBackup 2.1. The last version to support MySQL 5.1 with builtin InnoDB was Percona XtraBackup 2.0.";
95 }
96
97- if($var_version =~ m/5\.1\.\d/ && $var_innodb_version =~ m/1\.0\.\d+$/) {
98- $ibbackup_binary = ($win eq 1 ? 'xtrabackup.exe' : 'xtrabackup');
99- }
100-
101- if($var_version =~ m/5\.1\.\d/ and $var_innodb_version =~ m/1\.0\.\d+-(rel)?\d/){
102+ if($var_version =~ m/5\.1\.\d/) {
103 $ibbackup_binary = ($win eq 1 ? 'xtrabackup.exe' : 'xtrabackup');
104 }
105
106@@ -3037,6 +3051,10 @@
107
108 This option specifies the list of databases that innobackupex should back up. The option accepts a string argument or path to file that contains the list of databases to back up. The list is of the form "databasename1[.table_name1] databasename2[.table_name2] . . .". If this option is not specified, all databases containing MyISAM and InnoDB tables will be backed up. Please make sure that --databases contains all of the InnoDB databases and tables, so that all of the innodb.frm files are also backed up. In case the list is very long, this can be specified in a file, and the full path of the file can be specified instead of the list. (See option --tables-file.)
109
110+=item --debug-sleep-before-unlock=SECONDS
111+
112+This is a debug-only option used by the XtraBackup test suite.
113+
114 =item --defaults-file=[MY.CNF]
115
116 This option specifies what file to read the default MySQL options from. The option accepts a string argument. It is also passed directly to xtrabackup's --defaults-file option. See the xtrabackup documentation for details.
117
118=== modified file 'patches/innodb56.patch'
119--- patches/innodb56.patch 2013-05-16 18:03:18 +0000
120+++ patches/innodb56.patch 2013-05-17 16:01:30 +0000
121@@ -1345,3 +1345,21 @@
122 #ifndef UNIV_HOTBACKUP
123 /****************************************************************//**
124 Starts Innobase and creates a new database if database files
125+--- a/configure.cmake
126++++ b/configure.cmake
127+@@ -965,14 +965,6 @@
128+ ENDIF()
129+
130+ CHECK_C_SOURCE_COMPILES("
131+- int main(int argc, char **argv)
132+- {
133+- extern char *__bss_start;
134+- return __bss_start ? 1 : 0;
135+- }"
136+-HAVE_BSS_START)
137+-
138+-CHECK_C_SOURCE_COMPILES("
139+ int main()
140+ {
141+ extern void __attribute__((weak)) foo(void);
142+
143
144=== added file 'test/t/bug1180922.sh'
145--- test/t/bug1180922.sh 1970-01-01 00:00:00 +0000
146+++ test/t/bug1180922.sh 2013-05-17 16:01:30 +0000
147@@ -0,0 +1,13 @@
148+########################################################################
149+# Bug #1180922: DBD::mysql error
150+########################################################################
151+
152+. inc/common.sh
153+
154+MYSQLD_EXTRA_MY_CNF_OPTS="wait_timeout=5"
155+
156+start_server
157+
158+backup_dir=$topdir/backup
159+
160+innobackupex --no-timestamp --debug-sleep-before-unlock=6 $backup_dir
161
162=== added file 'test/t/server_version.sh'
163--- test/t/server_version.sh 1970-01-01 00:00:00 +0000
164+++ test/t/server_version.sh 2013-05-17 16:01:30 +0000
165@@ -0,0 +1,46 @@
166+#########################################################################
167+# Test server version auto-detection
168+#########################################################################
169+
170+. inc/common.sh
171+
172+# This test can only work when the xtrabackup binary autodetected by
173+# innobackupex matches the binary built for this configuration, i.e. with
174+# XB_BUILD=(xtradb51|xtradb55|xtradb56|innodb56)
175+
176+case "$XB_BUILD" in
177+ "xtradb51" | "xtradb55" | "xtradb56" | "innodb56")
178+ ;;
179+ *)
180+ echo "Requires (xtradb51|xtradb55|xtradb56|innodb56) \
181+build configuration" >> $SKIPPED_REASON
182+ exit $SKIPPED_EXIT_CODE
183+ ;;
184+esac
185+
186+start_server
187+
188+# Remove the explicit --ibbackup option from IB_ARGS
189+IB_ARGS="--defaults-file=$MYSQLD_VARDIR/my.cnf"
190+
191+backup_dir=$topdir/backup
192+innobackupex --no-timestamp $backup_dir
193+vlog "Backup created in directory $backup_dir"
194+
195+stop_server
196+# Remove datadir
197+rm -r $mysql_datadir
198+# Restore sakila
199+vlog "Applying log"
200+vlog "###########"
201+vlog "# PREPARE #"
202+vlog "###########"
203+innobackupex --apply-log $backup_dir
204+vlog "Restoring MySQL datadir"
205+mkdir -p $mysql_datadir
206+vlog "###########"
207+vlog "# RESTORE #"
208+vlog "###########"
209+innobackupex --copy-back $backup_dir
210+
211+start_server
212
213=== modified file 'test/testrun.sh'
214--- test/testrun.sh 2013-05-07 13:32:47 +0000
215+++ test/testrun.sh 2013-05-17 16:01:30 +0000
216@@ -234,7 +234,7 @@
217 export MYSQL_VERSION MYSQL_VERSION_COMMENT MYSQL_FLAVOR \
218 INNODB_VERSION XTRADB_VERSION INNODB_FLAVOR \
219 XB_BIN IB_BIN IB_ARGS XB_ARGS MYSQLD_EXTRA_ARGS \
220- DEFAULT_IBDATA_SIZE
221+ DEFAULT_IBDATA_SIZE XB_BUILD
222 }
223
224 export SKIPPED_EXIT_CODE=200

Subscribers

People subscribed via source and target branches

to all changes: