[packages/mysql] mysqlhotcopy: do not fail storing slave status if master status can't be fetched

glen glen at pld-linux.org
Tue May 21 10:56:42 CEST 2013


commit b9dfaa43a89da8831ac95a78a4e712a82a0d9387
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue May 21 11:55:53 2013 +0300

    mysqlhotcopy: do not fail storing slave status if master status can't be fetched
    
    it's perfectly valid to fetch only slave status, having master status
    not present, i.e store log pos of slave-only node

 mysql.spec                 |  4 +++-
 mysqlhotcopy-5.0-5.5.patch | 11 +++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/mysql.spec b/mysql.spec
index 9cea534..0794cd3 100644
--- a/mysql.spec
+++ b/mysql.spec
@@ -35,7 +35,7 @@ Summary(uk.UTF-8):	MySQL - швидкий SQL-сервер
 Summary(zh_CN.UTF-8):	MySQL数据库服务器
 Name:		mysql
 Version:	5.5.30
-Release:	2
+Release:	3
 License:	GPL + MySQL FLOSS Exception
 Group:		Applications/Databases
 # Source0Download: http://dev.mysql.com/downloads/mysql/5.5.html#downloads
@@ -60,6 +60,7 @@ Source14:	my.cnf
 # from fedora
 Source15:	lib%{name}.version
 
+Patch2:		mysqlhotcopy-5.0-5.5.patch
 Patch3:		bug-67402.patch
 # from fedora
 Patch5:		%{name}-versioning.patch
@@ -491,6 +492,7 @@ mv sphinx-*/mysqlse storage/sphinx
 %patch18 -p1
 %endif
 
+%patch2 -p1
 %patch3 -p1
 
 %patch5 -p1
diff --git a/mysqlhotcopy-5.0-5.5.patch b/mysqlhotcopy-5.0-5.5.patch
new file mode 100644
index 0000000..3382da2
--- /dev/null
+++ b/mysqlhotcopy-5.0-5.5.patch
@@ -0,0 +1,11 @@
+--- ./scripts/mysqlhotcopy.sh~	2013-03-19 11:30:02.000000000 +0200
++++ ./scripts/mysqlhotcopy.sh	2013-05-10 00:42:25.986175909 +0300
+@@ -789,7 +789,7 @@
+ 
+     eval {
+ 	my ($file,$position) = get_row( $dbh, "show master status" );
+-	die "master status is undefined" if !defined $file || !defined $position;
++	warn "master status is undefined" if !defined $file || !defined $position;
+ 	
+ 	my $row_hash = get_row_hash( $dbh, "show slave status" );
+ 	my ($master_host, $log_file, $log_pos ); 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mysql.git/commitdiff/b9dfaa43a89da8831ac95a78a4e712a82a0d9387



More information about the pld-cvs-commit mailing list