summaryrefslogtreecommitdiff
path: root/support-files/mysql.server.sh
diff options
context:
space:
mode:
authorSeppo Jaakola <seppo.jaakola@codership.com>2013-08-21 16:34:31 +0300
committerSeppo Jaakola <seppo.jaakola@codership.com>2013-08-21 16:34:31 +0300
commit4222b2520bdea2be41b50b888f930a63f5af8991 (patch)
tree02fcc81139a9a099f0d07c25d03e8b3f40f4c6b6 /support-files/mysql.server.sh
parent551ad1cf6f80ad1fab35746eee304d733baa9adf (diff)
parentc7973615e723b13c6457b494b72be2fac35bfd18 (diff)
downloadmariadb-git-4222b2520bdea2be41b50b888f930a63f5af8991.tar.gz
Merge with mariadb 5.5: bzr merge lp:maria/5.5 --rtag:mariadb-5.5.32
Diffstat (limited to 'support-files/mysql.server.sh')
-rw-r--r--support-files/mysql.server.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
index 0879288fe6c..63c449b2228 100644
--- a/support-files/mysql.server.sh
+++ b/support-files/mysql.server.sh
@@ -378,7 +378,13 @@ case "$mode" in
else
# Try to find appropriate mysqld process
mysqld_pid=`pidof $libexecdir/mysqld`
- if test -z $mysqld_pid ; then
+
+ # test if multiple pids exist
+ pid_count=`echo $mysqld_pid | wc -w`
+ if test $pid_count -gt 1 ; then
+ log_failure_msg "Multiple MySQL running but PID file could not be found ($mysqld_pid)"
+ exit 5
+ elif test -z $mysqld_pid ; then
if test -f "$lock_file_path" ; then
log_failure_msg "MySQL is not running, but lock file ($lock_file_path) exists"
exit 2