Work around some portability issues on PPC64

This commit is contained in:
Tom Lane 2011-02-02 17:59:34 -05:00 committed by Michal Schorm
parent d6aa0db756
commit 6303e84448
2 changed files with 56 additions and 3 deletions

42
mysql-plugin-bool.patch Normal file
View File

@ -0,0 +1,42 @@
Fix plugin boolean variables to receive the value "1", not "-1", when they
are set to 1. Aside from being bizarre, the existing behavior is unportable:
machines where char is unsigned print "255" instead. Filed upstream at
http://bugs.mysql.com/bug.php?id=59905
diff -Naur mysql-5.5.8.orig/sql/sql_plugin.cc mysql-5.5.8/sql/sql_plugin.cc
--- mysql-5.5.8.orig/sql/sql_plugin.cc 2010-12-03 12:58:26.000000000 -0500
+++ mysql-5.5.8/sql/sql_plugin.cc 2011-02-01 20:34:10.218305349 -0500
@@ -2024,7 +2024,7 @@
goto err;
result= (int) tmp;
}
- *(my_bool *) save= -result;
+ *(my_bool *) save= result ? true : false;
return 0;
err:
return 1;
diff -Naur mysql-5.5.8.orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result mysql-5.5.8/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result
--- mysql-5.5.8.orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result 2010-12-03 12:58:25.000000000 -0500
+++ mysql-5.5.8/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result 2011-02-01 21:53:20.006302245 -0500
@@ -45,7 +45,7 @@
ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable and should be set with SET GLOBAL
select @@global.rpl_semi_sync_master_enabled;
@@global.rpl_semi_sync_master_enabled
--1
+1
select @@session.rpl_semi_sync_master_enabled;
ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable
show global variables like 'rpl_semi_sync_master_enabled';
diff -Naur mysql-5.5.8.orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result mysql-5.5.8/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result
--- mysql-5.5.8.orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result 2010-12-03 12:58:26.000000000 -0500
+++ mysql-5.5.8/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result 2011-02-01 21:53:59.689249491 -0500
@@ -45,7 +45,7 @@
ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable and should be set with SET GLOBAL
select @@global.rpl_semi_sync_slave_enabled;
@@global.rpl_semi_sync_slave_enabled
--1
+1
select @@session.rpl_semi_sync_slave_enabled;
ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable
show global variables like 'rpl_semi_sync_slave_enabled';

View File

@ -1,6 +1,6 @@
Name: mysql Name: mysql
Version: 5.5.8 Version: 5.5.8
Release: 6%{?dist} Release: 7%{?dist}
Summary: MySQL client programs and shared libraries Summary: MySQL client programs and shared libraries
Group: Applications/Databases Group: Applications/Databases
URL: http://www.mysql.com URL: http://www.mysql.com
@ -42,6 +42,7 @@ Patch8: mysql-dubious-exports.patch
Patch9: mysql-disable-test.patch Patch9: mysql-disable-test.patch
Patch10: mysql-embedded-crash.patch Patch10: mysql-embedded-crash.patch
Patch11: mysql-home.patch Patch11: mysql-home.patch
Patch12: mysql-plugin-bool.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: gperf, perl, readline-devel, openssl-devel BuildRequires: gperf, perl, readline-devel, openssl-devel
@ -49,8 +50,8 @@ BuildRequires: gcc-c++, cmake, ncurses-devel, zlib-devel, libaio-devel
BuildRequires: systemtap-sdt-devel BuildRequires: systemtap-sdt-devel
# make test requires time and ps # make test requires time and ps
BuildRequires: time procps BuildRequires: time procps
# Socket is needed to run regression tests # Socket and Time::HiRes are needed to run regression tests
BuildRequires: perl(Socket) BuildRequires: perl(Socket), perl(Time::HiRes)
Requires: grep, fileutils Requires: grep, fileutils
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
@ -181,6 +182,7 @@ the MySQL sources.
%patch9 -p1 %patch9 -p1
%patch10 -p1 %patch10 -p1
%patch11 -p1 %patch11 -p1
%patch12 -p1
# workaround for upstream bug #56342 # workaround for upstream bug #56342
rm -f mysql-test/t/ssl_8k_key-master.opt rm -f mysql-test/t/ssl_8k_key-master.opt
@ -206,6 +208,11 @@ CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
CFLAGS="$CFLAGS -fno-strict-aliasing -fwrapv" CFLAGS="$CFLAGS -fno-strict-aliasing -fwrapv"
# force PIC mode so that we can build libmysqld.so # force PIC mode so that we can build libmysqld.so
CFLAGS="$CFLAGS -fPIC" CFLAGS="$CFLAGS -fPIC"
# MySQL 5.5.8 fails its gis regression test on PPC without -ffloat-store;
# filed upstream at http://bugs.mysql.com/bug.php?id=59908
%ifarch ppc ppc64
CFLAGS="$CFLAGS -ffloat-store"
%endif
# gcc seems to have some bugs on sparc as of 4.4.1, back off optimization # gcc seems to have some bugs on sparc as of 4.4.1, back off optimization
# submitted as bz #529298 # submitted as bz #529298
%ifarch sparc sparcv9 sparc64 %ifarch sparc sparcv9 sparc64
@ -599,6 +606,10 @@ fi
%{_mandir}/man1/mysql_client_test.1* %{_mandir}/man1/mysql_client_test.1*
%changelog %changelog
* Wed Feb 2 2011 Tom Lane <tgl@redhat.com> 5.5.8-7
- Work around some portability issues on PPC64
Resolves: #674253
* Thu Jan 20 2011 Tom Lane <tgl@redhat.com> 5.5.8-6 * Thu Jan 20 2011 Tom Lane <tgl@redhat.com> 5.5.8-6
- Remove no-longer-needed special switches in CXXFLAGS, per yesterday's - Remove no-longer-needed special switches in CXXFLAGS, per yesterday's
discussion in fedora-devel about -fexceptions. discussion in fedora-devel about -fexceptions.