summaryrefslogtreecommitdiff
path: root/scripts/mysqld_safe.sh
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@skysql.com>2014-08-11 23:55:41 -0400
committerNirbhay Choubey <nirbhay@skysql.com>2014-08-11 23:55:41 -0400
commit8358dd53b7406deaa9f50ad09b16a86b7e367632 (patch)
treeef8995ad0e400cb6a1842649c3c886c7b3474835 /scripts/mysqld_safe.sh
parente06e12f5b8dfe0ab2e5976eec1b27b25d318441b (diff)
parent4105cbf4a230c82ea7dee31d4d2262b798fad9f4 (diff)
downloadmariadb-git-8358dd53b7406deaa9f50ad09b16a86b7e367632.tar.gz
bzr merge -r4346 maria/10.0 (maria-10.0.13)
Diffstat (limited to 'scripts/mysqld_safe.sh')
-rw-r--r--scripts/mysqld_safe.sh29
1 files changed, 13 insertions, 16 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index e7eb2e72cbd..dc831434dbe 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -273,16 +273,6 @@ wsrep_recover_position() {
}
parse_arguments() {
- # We only need to pass arguments through to the server if we don't
- # handle them here. So, we collect unrecognized options (passed on
- # the command line) into the args variable.
- pick_args=
- if test "$1" = PICK-ARGS-FROM-ARGV
- then
- pick_args=1
- shift
- fi
-
for arg do
val=`echo "$arg" | sed -e "s;--[^=]*=;;"`
case "$arg" in
@@ -340,11 +330,10 @@ parse_arguments() {
--help) usage ;;
*)
- if test -n "$pick_args"
- then
- append_arg_to_args "$arg"
- fi
- ;;
+ case "$unrecognized_handling" in
+ collect) append_arg_to_args "$arg" ;;
+ complain) log_error "unknown option '$arg'" ;;
+ esac
esac
done
}
@@ -601,8 +590,16 @@ then
SET_USER=0
fi
+# If arguments come from [mysqld_safe] section of my.cnf
+# we complain about unrecognized options
+unrecognized_handling=complain
parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld mariadb_safe`
-parse_arguments PICK-ARGS-FROM-ARGV "$@"
+
+# We only need to pass arguments through to the server if we don't
+# handle them here. So, we collect unrecognized options (passed on
+# the command line) into the args variable.
+unrecognized_handling=collect
+parse_arguments "$@"
#