Blob Blame History Raw
Upstream changed location of the temporary file in the wsrep_recover_position
function, which causes issues on RHEL-6, because mysqld_safe is not expected
to play with files in /tmp, and SELinux started to complain.

Changing the location of the temporary files to the datadir means practically
reverting part of the upstream commit
https://github.com/MariaDB/server/commit/bb7a70c9551c1756b1d1736ca4f6a0a965795873

Upstream issue: https://jira.mariadb.org/browse/MDEV-10767

diff -up mariadb-10.1.29/scripts/mysqld_safe.sh.recoverpath mariadb-10.1.29/scripts/mysqld_safe.sh
--- mariadb-10.1.29/scripts/mysqld_safe.sh.recoverpath	2017-11-23 10:48:37.538678722 +0100
+++ mariadb-10.1.29/scripts/mysqld_safe.sh	2017-11-23 10:50:48.134585794 +0100
@@ -246,7 +246,7 @@ wsrep_recover_position() {
   local euid=$(id -u)
   local ret=0
 
-  local wr_logfile=$(mktemp /tmp/wsrep_recovery.XXXXXX)
+  local wr_logfile=$(mktemp $DATADIR/wsrep_recovery.XXXXXX)
 
   # safety checks
   if [ -z $wr_logfile ]; then