From 45c128c5a5418244a66750f4c2c7d7e2c8730df2 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 6 Jul 2012 11:49:25 -0400 Subject: [PATCH] Update to MySQL 5.5.25a; stop using systemd's Restart option --- .gitignore | 2 +- mysql.spec | 11 +++++++--- mysqld-nowatch.patch | 51 -------------------------------------------- mysqld-wait-ready | 2 +- mysqld.service | 7 ++---- sources | 2 +- 6 files changed, 13 insertions(+), 62 deletions(-) delete mode 100644 mysqld-nowatch.patch diff --git a/.gitignore b/.gitignore index d942bd7..f6d64c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/mysql-5.5.24-nodocs.tar.gz +/mysql-5.5.25a-nodocs.tar.gz diff --git a/mysql.spec b/mysql.spec index b521eb3..f3492e2 100644 --- a/mysql.spec +++ b/mysql.spec @@ -1,5 +1,5 @@ Name: mysql -Version: 5.5.24 +Version: 5.5.25a Release: 1%{?dist} Summary: MySQL client programs and shared libraries @@ -49,7 +49,6 @@ Patch8: mysql-dubious-exports.patch Patch10: mysql-plugin-bool.patch Patch11: mysql-s390-tsc.patch Patch12: mysql-openssl-test.patch -Patch13: mysqld-nowatch.patch Patch14: mysql-va-list.patch Patch15: mysql-netdevname.patch Patch16: mysql-logrotate.patch @@ -205,7 +204,6 @@ the MySQL sources. %patch10 -p1 %patch11 -p1 %patch12 -p1 -%patch13 -p1 %patch14 -p1 %patch15 -p1 %patch16 -p1 @@ -693,6 +691,13 @@ fi %{_mandir}/man1/mysql_client_test.1* %changelog +* Fri Jul 6 2012 Tom Lane 5.5.25a-1 +- Update to MySQL 5.5.25a, for various fixes described at + http://dev.mysql.com/doc/refman/5.5/en/news-5-5-25a.html + http://dev.mysql.com/doc/refman/5.5/en/news-5-5-25.html +- Don't use systemd's Restart feature; rely on mysqld_safe instead +Resolves: #832029 + * Mon Jun 11 2012 Tom Lane 5.5.24-1 - Update to MySQL 5.5.24, for various fixes described at http://dev.mysql.com/doc/refman/5.5/en/news-5-5-24.html diff --git a/mysqld-nowatch.patch b/mysqld-nowatch.patch deleted file mode 100644 index 9ca2d12..0000000 --- a/mysqld-nowatch.patch +++ /dev/null @@ -1,51 +0,0 @@ -Add a --nowatch option to mysqld_safe that causes it to exit after -spawning mysqld. We don't need mysqld_safe to restart mysqld after -a crash, because systemd can do that just fine. - - -diff -Naur mysql-5.5.14.orig/scripts/mysqld_safe.sh mysql-5.5.14/scripts/mysqld_safe.sh ---- mysql-5.5.14.orig/scripts/mysqld_safe.sh 2011-06-21 12:42:40.000000000 -0400 -+++ mysql-5.5.14/scripts/mysqld_safe.sh 2011-07-25 13:52:40.363068060 -0400 -@@ -15,6 +15,7 @@ - KILL_MYSQLD=1; - MYSQLD= - niceness=0 -+nowatch=0 - mysqld_ld_preload= - mysqld_ld_library_path= - -@@ -54,6 +55,7 @@ - --mysqld=FILE Use the specified file as mysqld - --mysqld-version=VERSION Use "mysqld-VERSION" as mysqld - --nice=NICE Set the scheduling priority of mysqld -+ --nowatch Exit after starting mysqld - --plugin-dir=DIR Plugins are under DIR or DIR/VERSION, if - VERSION is given - --skip-kill-mysqld Don't try to kill stray mysqld processes -@@ -140,8 +142,16 @@ - ;; - esac - -- #echo "Running mysqld: [$cmd]" -- eval "$cmd" -+ if test $nowatch -eq 1 -+ then -+ # We'd prefer to exec $cmd here, but SELinux needs to be fixed first -+ #/usr/bin/logger "Running mysqld: $cmd" -+ eval "$cmd &" -+ exit 0 -+ else -+ #echo "Running mysqld: [$cmd]" -+ eval "$cmd" -+ fi - } - - shell_quote_string() { -@@ -198,6 +208,7 @@ - fi - ;; - --nice=*) niceness="$val" ;; -+ --nowatch) nowatch=1 ;; - --open-files-limit=*) open_files="$val" ;; - --open_files_limit=*) open_files="$val" ;; - --skip-kill-mysqld*) KILL_MYSQLD=0 ;; diff --git a/mysqld-wait-ready b/mysqld-wait-ready index 10e86fe..8fe99ec 100644 --- a/mysqld-wait-ready +++ b/mysqld-wait-ready @@ -6,7 +6,7 @@ # Running this as ExecStartPost is useful so that services declared as # "After mysqld" won't be started until the database is really ready. -# Service file passes us the daemon's PID +# Service file passes us the daemon's PID (actually, mysqld_safe's PID) daemon_pid="$1" # extract value of a MySQL option from config files diff --git a/mysqld.service b/mysqld.service index 7289f9d..c6e4dea 100644 --- a/mysqld.service +++ b/mysqld.service @@ -23,22 +23,19 @@ After=syslog.target After=network.target [Service] -Type=forking +Type=simple User=mysql Group=mysql ExecStartPre=/usr/libexec/mysqld-prepare-db-dir # Note: we set --basedir to prevent probes that might trigger SELinux alarms, # per bug #547485 -ExecStart=/usr/bin/mysqld_safe --nowatch --basedir=/usr +ExecStart=/usr/bin/mysqld_safe --basedir=/usr ExecStartPost=/usr/libexec/mysqld-wait-ready $MAINPID # Give a reasonable amount of time for the server to start up/shut down TimeoutSec=300 -# We rely on systemd, not mysqld_safe, to restart mysqld if it dies -Restart=always - # Place temp files in a secure directory, not /tmp PrivateTmp=true diff --git a/sources b/sources index 87aa00a..1598ba1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e42efbddfa93a16ec137dfcbeb996c24 mysql-5.5.24-nodocs.tar.gz +4f0db6cea9f201aa89fb7c80ac915796 mysql-5.5.25a-nodocs.tar.gz