[Commits] Rev 3511: MDEV-4728: MariaDB can't start while bootup in lp:~maria-captains/maria/maria-5.5-galera

Nirbhay Choubey nirbhay at skysql.com
Tue Jul 15 07:54:38 EEST 2014


At lp:~maria-captains/maria/maria-5.5-galera

------------------------------------------------------------
revno: 3511
revision-id: nirbhay at skysql.com-20140715045429-d00tr2k9h0ftaqr4
parent: nirbhay at skysql.com-20140712222045-ek5is1rcfj0rpmah
committer: Nirbhay Choubey <nirbhay at skysql.com>
branch nick: maria-5.5-galera
timestamp: Tue 2014-07-15 00:54:29 -0400
message:
  MDEV-4728: MariaDB can't start while bootup
  
  Introduced safety checks to ensure mysqld_safe terminates
  if mktemp fails to create a valid file.
-------------- next part --------------
=== modified file 'scripts/mysqld_safe.sh'
--- a/scripts/mysqld_safe.sh	2014-04-16 09:13:43 +0000
+++ b/scripts/mysqld_safe.sh	2014-07-15 04:54:29 +0000
@@ -229,8 +229,19 @@
 
   local wr_logfile=$(mktemp $DATADIR/wsrep_recovery.XXXXXX)
 
-  [ "$euid" = "0" ] && chown $user $wr_logfile
-  chmod 600 $wr_logfile
+  # safety checks
+  if [ -z $wr_logfile ]; then
+    log_error "WSREP: mktemp failed"
+    return 1
+  fi
+
+  if [ -f $wr_logfile ]; then
+    [ "$euid" = "0" ] && chown $user $wr_logfile
+    chmod 600 $wr_logfile
+  else
+    log_error "WSREP: mktemp failed"
+    return 1
+  fi
 
   local wr_pidfile="$DATADIR/"`@HOSTNAME@`"-recover.pid"
 



More information about the commits mailing list