Skip to content

Commit 8b13a19

Browse files
committed
Merge branch '5.7-v25' into MW-388-5.7
2 parents e251c35 + 2cfe070 commit 8b13a19

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

scripts/mysqld_safe.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,16 @@ wsrep_recover_position() {
269269
wsrep_start_position_opt="--wsrep_start_position=$start_pos"
270270
fi
271271

272-
rm $wr_logfile
272+
if [ $ret -eq 0 ] ; then
273+
local wr_logfile_permanent="$DATADIR/wsrep_recovery.ok"
274+
else
275+
local wr_logfile_permanent="$DATADIR/wsrep_recovery.fail"
276+
fi
277+
touch $wr_logfile_permanent
278+
[ "$euid" = "0" ] && chown $user $wr_logfile_permanent
279+
chmod 600 $wr_logfile_permanent
280+
cat "$wr_logfile" >> $wr_logfile_permanent
281+
rm -f "$wr_logfile"
273282

274283
return $ret
275284
}

0 commit comments

Comments
 (0)