[Commits] Rev 3862: MDEV-4728: local merge from maria-5.5-galera. in lp:~maria-captains/maria/maria-10.0-galera

Nirbhay Choubey nirbhay at skysql.com
Tue Jul 15 08:01:55 EEST 2014


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

------------------------------------------------------------
revno: 3862
revision-id: nirbhay at skysql.com-20140715050149-46sygs7af6xab7xb
parent: nirbhay at skysql.com-20140712222129-6le4ojr1d9v5qjqm
committer: Nirbhay Choubey <nirbhay at skysql.com>
branch nick: maria-10.0-galera
timestamp: Tue 2014-07-15 01:01:49 -0400
message:
  MDEV-4728: local merge from maria-5.5-galera.
-------------- next part --------------
=== modified file 'scripts/mysqld_safe.sh'
--- a/scripts/mysqld_safe.sh	2014-05-21 15:09:55 +0000
+++ b/scripts/mysqld_safe.sh	2014-07-15 05:01:49 +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