List:Contributions« Previous Message
From:Mohammad Rahman Date:October 5 2008 2:44pm
Subject:Community contribution WL#799
View as plain text  

Patch for WL#799 on mysql-5.1.28-rc/scripts/

---      2008-08-28 11:40:52.000000000 -0400
+++  2008-10-05 10:10:12.000000000 -0400
@@ -513,6 +513,30 @@

+# if there exists a socket file, check if server is alive.
+# If it gets alive signal by ping command from mysqladmin
+# then terminate, otherwise proceed.
+if test -S $safe_mysql_unix_port
+  if test -x ./bin/mysqladmin
+  then
+    my_admin="./bin/mysqladmin"
+  elif test -x @bindir@/mysqladmin
+  then
+    my_admin="@bindir@/mysqladmin"
+  else
+    my_admin="mysqladmin"
+  fi
+  cmd="$my_admin --socket=$safe_mysql_unix_port $USER_OPTION ping"
+  if eval $cmd | grep -v grep | grep "mysqld is alive" > /dev/null
+  then
+    echo "A mysqld process is alive on socket "$safe_mysql_unix_port
+    echo "A mysqld process is alive on socket "$safe_mysql_unix_port `date` >>
+    exit 1
+  fi
# Uncomment the following lines if you want all tables to be automatically
# checked and repaired during startup. You should add sensible key_buffer

I could reproduce the problem mentioned in the work log for case where
some one deletes the pid file. No idea about others ways to reproduce.


Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the
All-new Yahoo! Mail.  Click on Options in Mail and switch to New Mail today or register
for free at
Attachment: [text/x-diff] WL#799.patch
Attachment: [text/x-diff] WL#799.patch
Community contribution WL#799Mohammad Rahman5 Oct