Commit 9c3f6237 authored by Nirbhay Choubey's avatar Nirbhay Choubey

MDEV-4728: MariaDB can't start while bootup

Introduced safety checks to ensure mysqld_safe terminates
if mktemp fails to create a valid file.
parent 3ce36470
...@@ -229,8 +229,19 @@ wsrep_recover_position() { ...@@ -229,8 +229,19 @@ wsrep_recover_position() {
local wr_logfile=$(mktemp $DATADIR/wsrep_recovery.XXXXXX) local wr_logfile=$(mktemp $DATADIR/wsrep_recovery.XXXXXX)
[ "$euid" = "0" ] && chown $user $wr_logfile # safety checks
chmod 600 $wr_logfile 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" local wr_pidfile="$DATADIR/"`@HOSTNAME@`"-recover.pid"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment