Update to MySQL 5.5.25a; stop using systemd's Restart option

This commit is contained in:
Tom Lane 2012-07-06 11:49:25 -04:00 committed by Michal Schorm
parent 7f33180e01
commit 45c128c5a5
6 changed files with 13 additions and 62 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
/mysql-5.5.24-nodocs.tar.gz
/mysql-5.5.25a-nodocs.tar.gz

View File

@ -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 <tgl@redhat.com> 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 <tgl@redhat.com> 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

View File

@ -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 ;;

View File

@ -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

View File

@ -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

View File

@ -1 +1 @@
e42efbddfa93a16ec137dfcbeb996c24 mysql-5.5.24-nodocs.tar.gz
4f0db6cea9f201aa89fb7c80ac915796 mysql-5.5.25a-nodocs.tar.gz