summaryrefslogtreecommitdiff
path: root/scripts/mysqld_safe.sh
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@skysql.com>2014-05-21 11:09:55 -0400
committerNirbhay Choubey <nirbhay@skysql.com>2014-05-21 11:09:55 -0400
commit086af8367ed2499adae378638225ceb14c85f046 (patch)
tree953720d86a4decd67a24b560ffbe277900ff9609 /scripts/mysqld_safe.sh
parent558995ad84ca1348dfe681a8d111650225fcc205 (diff)
parent1170a54060168d885cbf682836342d4fc4ccae1a (diff)
downloadmariadb-git-086af8367ed2499adae378638225ceb14c85f046.tar.gz
bzr merge -r4209 maria/10.0.
Diffstat (limited to 'scripts/mysqld_safe.sh')
-rw-r--r--scripts/mysqld_safe.sh39
1 files changed, 16 insertions, 23 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 3cd691b7c6c..33b1300492f 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -273,38 +273,32 @@ parse_arguments() {
fi
for arg do
- # the parameter after "=", or the whole $arg if no match
- val=`echo "$arg" | sed -e 's;^--[^=]*=;;'`
- # what's before "=", or the whole $arg if no match
- optname=`echo "$arg" | sed -e 's/^\(--[^=]*\)=.*$/\1/'`
- # replace "_" by "-" ; mysqld_safe must accept "_" like mysqld does.
- optname_subst=`echo "$optname" | sed 's/_/-/g'`
- arg=`echo $arg | sed "s/^$optname/$optname_subst/"`
+ val=`echo "$arg" | sed -e "s;--[^=]*=;;"`
case "$arg" in
- --crash-script=*) CRASH_SCRIPT="$val" ;;
+ --crash[-_]script=*) CRASH_SCRIPT="$val" ;;
# these get passed explicitly to mysqld
--basedir=*) MY_BASEDIR_VERSION="$val" ;;
--datadir=*|--data=*) DATADIR="$val" ;;
- --pid-file=*) pid_file="$val" ;;
- --plugin-dir=*) PLUGIN_DIR="$val" ;;
+ --pid[-_]file=*) pid_file="$val" ;;
+ --plugin[-_]dir=*) PLUGIN_DIR="$val" ;;
--user=*) user="$val"; SET_USER=1 ;;
- --log-basename=*|--hostname=*|--loose-log-basename=*)
+ --log[-_]basename=*|--hostname=*|--loose[-_]log[-_]basename=*)
pid_file="$val.pid";
err_log="$val.err";
;;
# these might have been set in a [mysqld_safe] section of my.cnf
# they are added to mysqld command line to override settings from my.cnf
- --log-error=*) err_log="$val" ;;
+ --log[-_]error=*) err_log="$val" ;;
--port=*) mysql_tcp_port="$val" ;;
--socket=*) mysql_unix_port="$val" ;;
# mysqld_safe-specific options - must be set in my.cnf ([mysqld_safe])!
- --core-file-size=*) core_file_size="$val" ;;
+ --core[-_]file[-_]size=*) core_file_size="$val" ;;
--ledir=*) ledir="$val" ;;
- --malloc-lib=*) set_malloc_lib "$val" ;;
+ --malloc[-_]lib=*) set_malloc_lib "$val" ;;
--mysqld=*) MYSQLD="$val" ;;
- --mysqld-version=*)
+ --mysqld[-_]version=*)
if test -n "$val"
then
MYSQLD="mysqld-$val"
@@ -314,17 +308,16 @@ parse_arguments() {
fi
;;
--nice=*) niceness="$val" ;;
- --nowatch|--no-watch|--no-auto-restart) nowatch=1 ;;
- --open-files-limit=*) open_files="$val" ;;
- --open_files_limit=*) open_files="$val" ;;
- --skip-kill-mysqld*) KILL_MYSQLD=0 ;;
+ --nowatch|--no[-_]watch|--no[-_]auto[-_]restart) nowatch=1 ;;
+ --open[-_]files[-_]limit=*) open_files="$val" ;;
+ --skip[-_]kill[-_]mysqld*) KILL_MYSQLD=0 ;;
--syslog) want_syslog=1 ;;
- --skip-syslog) want_syslog=0 ;;
- --syslog-tag=*) syslog_tag="$val" ;;
+ --skip[-_]syslog) want_syslog=0 ;;
+ --syslog[-_]tag=*) syslog_tag="$val" ;;
--timezone=*) TZ="$val"; export TZ; ;;
+ --flush[-_]caches) flush_caches=1 ;;
+ --numa[-_]interleave) numa_interleave=1 ;;
--wsrep[-_]urls=*) wsrep_urls="$val"; ;;
- --flush-caches) flush_caches=1 ;;
- --numa-interleave) numa_interleave=1 ;;
--wsrep[-_]provider=*)
if test -n "$val" && test "$val" != "none"
then