diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-04-22 18:18:51 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-04-22 18:18:51 +0300 |
commit | 88cf6f1c7ff5d56138c8b53a5adaca4c61752f86 (patch) | |
tree | eee8eed7e9388a575de4d9c948b0706e2356d694 /scripts | |
parent | 498c5e2be1021569c1d5554bcb91f45090e30d4b (diff) | |
parent | 455cf6196c8c73f5a50004ac7f31a9be8ac14bbe (diff) | |
download | mariadb-git-88cf6f1c7ff5d56138c8b53a5adaca4c61752f86.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysqld_safe.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index ef72737766d..3dda22507af 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -235,7 +235,9 @@ wsrep_recover_position() { fi if [ -f $wr_logfile ]; then - [ "$euid" = "0" ] && chown $user $wr_logfile + # NOTE! Do not change ownership of the temporary file, as on newer kernel + # versions fs.protected_regular is set to '2' and redirecting output with > + # as root to a file not owned by root will fail with "Permission denied" chmod 600 $wr_logfile else log_error "WSREP: mktemp failed" @@ -250,6 +252,11 @@ wsrep_recover_position() { eval "$mysqld_cmd --wsrep_recover $wr_options 2> $wr_logfile" + if [ ! -s "$wr_logfile" ]; then + log_error "Log file $wr_logfile was empty, cannot proceed. Is system running fs.protected_regular?" + exit 1 + fi + local rp="$(grep 'WSREP: Recovered position:' $wr_logfile)" if [ -z "$rp" ]; then local skipped="$(grep WSREP $wr_logfile | grep 'skipping position recovery')" |