summaryrefslogtreecommitdiff
path: root/scripts/mysqld_safe.sh
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-09-23 08:26:08 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-09-23 08:26:08 +0300
commit44c5144943f534b9dcd8ac771955127c7e1c2146 (patch)
tree3aab34b221a165f50758cc7d8c0f21f49d57c4ee /scripts/mysqld_safe.sh
parent1ad79c818780aafe1aaf1c25bbf975eb31a38a40 (diff)
parent896974fc3d721aabe1afbf637a566cab856a731d (diff)
downloadmariadb-git-44c5144943f534b9dcd8ac771955127c7e1c2146.tar.gz
Merge 10.1 into 10.2
Diffstat (limited to 'scripts/mysqld_safe.sh')
-rw-r--r--scripts/mysqld_safe.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index d4f13eadf4b..f33592a09f0 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -958,7 +958,13 @@ do
cmd="$cmd "`shell_quote_string "$i"`
done
cmd="$cmd $args"
-[ $dry_run -eq 1 ] && return
+
+if [ $dry_run -eq 1 ]
+then
+ # RETURN or EXIT depending if the script is being sourced or not.
+ (return 2> /dev/null) && return || exit
+fi
+
# Avoid 'nohup: ignoring input' warning
test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null"