From eb8f59bfd8a7ad0b7f4b357bbc042011c6c6e702 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 10 May 2011 16:49:58 -0400 Subject: [PATCH] Add LSB init block to initscript, other fixes --- mysql-disable-test.patch | 7 +------ mysql.init | 23 ++++++++++++++++++++++- mysql.spec | 13 +++++++++++-- 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/mysql-disable-test.patch b/mysql-disable-test.patch index 48020b8..0914f8f 100644 --- a/mysql-disable-test.patch +++ b/mysql-disable-test.patch @@ -12,10 +12,6 @@ Also disable perfschema.binlog_mix and perfschema.binlog_row, which have expected output that doesn't match when openssl is in use. Upstream at http://bugs.mysql.com/bug.php?id=59091 -Also disable gis, which expects the results of floating-point calculations -to match to seventeen digits precision everywhere. Of course they won't. -Upstream at http://bugs.mysql.com/bug.php?id=59908 - Also disable innodb.innodb, which is showing platform-dependent results as of 5.5.9. Upstream at http://bugs.mysql.com/bug.php?id=60155 @@ -23,7 +19,7 @@ as of 5.5.9. Upstream at http://bugs.mysql.com/bug.php?id=60155 diff -Naur mysql-5.5.9.orig/mysql-test/t/disabled.def mysql-5.5.9/mysql-test/t/disabled.def --- mysql-5.5.9.orig/mysql-test/t/disabled.def 2011-01-19 17:37:09.000000000 -0500 +++ mysql-5.5.9/mysql-test/t/disabled.def 2011-02-16 23:19:34.844378338 -0500 -@@ -18,3 +18,10 @@ +@@ -18,3 +18,9 @@ sum_distinct-big : Bug#56927 2010-11-15 mattiasj was not tested alter_table-big : Bug#37248 2010-11-15 mattiasj was not tested create-big : Bug#37248 2010-11-15 mattiasj was not tested @@ -32,5 +28,4 @@ diff -Naur mysql-5.5.9.orig/mysql-test/t/disabled.def mysql-5.5.9/mysql-test/t/d +sys_vars.plugin_dir_basic : bug#52223 fails for lib64 library directory +perfschema.binlog_mix : bug#59091 fails with openssl +perfschema.binlog_row : bug#59091 fails with openssl -+gis : bug#59908 has platform-dependent results +innodb.innodb : bug#60155 has platform-dependent results diff --git a/mysql.init b/mysql.init index 1661f3b..e644cb5 100644 --- a/mysql.init +++ b/mysql.init @@ -8,6 +8,15 @@ # processname: mysqld # config: /etc/my.cnf # pidfile: /var/run/mysqld/mysqld.pid +### BEGIN INIT INFO +# Provides: mysqld +# Required-Start: $local_fs $remote_fs $network $named $syslog $time +# Required-Stop: $local_fs $remote_fs $network $named $syslog $time +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: start and stop MySQL server +# Description: MySQL database server +### END INIT INFO # Source function library. . /etc/rc.d/init.d/functions @@ -107,7 +116,19 @@ start(){ ret=0 TIMEOUT="$STARTTIMEOUT" while [ $TIMEOUT -gt 0 ]; do - RESPONSE=`/usr/bin/mysqladmin --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1` && break + RESPONSE=`/usr/bin/mysqladmin --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1` + mret=$? + if [ $mret -eq 0 ]; then + break + fi + # exit codes 1, 11 (EXIT_CANNOT_CONNECT_TO_SERVICE) are expected, + # anything else suggests a configuration error + if [ $mret -ne 1 -a $mret -ne 11 ]; then + echo "$RESPONSE" + echo "Cannot check for MySQL Daemon startup because of mysqladmin failure." + ret=1 + break + fi echo "$RESPONSE" | grep -q "Access denied for user" && break if ! /bin/kill -0 $safe_pid 2>/dev/null; then echo "MySQL Daemon failed to start." diff --git a/mysql.spec b/mysql.spec index 447cdfd..8deec95 100644 --- a/mysql.spec +++ b/mysql.spec @@ -1,6 +1,6 @@ Name: mysql Version: 5.5.10 -Release: 2%{?dist} +Release: 3%{?dist} Summary: MySQL client programs and shared libraries Group: Applications/Databases URL: http://www.mysql.com @@ -47,7 +47,7 @@ Patch12: mysql-plugin-bool.patch Patch13: mysql-s390-tsc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildRequires: gperf, perl, readline-devel, openssl-devel +BuildRequires: perl, readline-devel, openssl-devel BuildRequires: gcc-c++, cmake, ncurses-devel, zlib-devel, libaio-devel BuildRequires: systemtap-sdt-devel # make test requires time and ps @@ -611,6 +611,15 @@ fi %{_mandir}/man1/mysql_client_test.1* %changelog +* Tue May 10 2011 Tom Lane 5.5.10-3 +- Add LSB init block to initscript, to ensure sane ordering at system boot +Resolves: #703214 +- Improve initscript start action to notice when mysqladmin is failing + because of configuration problems +Related: #703476 +- Remove exclusion of "gis" regression test, since upstream bug 59908 + is fixed (for some value of "fixed") as of 5.5.10. + * Wed Mar 23 2011 Tom Lane 5.5.10-2 - Add my_make_scrambled_password to the list of symbols exported by libmysqlclient.so. Needed at least by pure-ftpd.