summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2003-12-19 23:08:20 +0100
committerunknown <serg@serg.mylan>2003-12-19 23:08:20 +0100
commit3b1b03736c0a62c7ba71f1a462aba8bc48fd6a6a (patch)
treee22e554ab4bc80f9f6785d0a82c820a67d85821c /scripts
parent2cab756498532f511cc9b10afe594ab64cf667de (diff)
downloadmariadb-git-3b1b03736c0a62c7ba71f1a462aba8bc48fd6a6a.tar.gz
do not put --user into command line if the value comes from [mysqld] or [server] sections
Bug #2163
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysqld_safe.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index ece4ba098f4..5d77863c9b4 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -46,8 +46,9 @@ parse_arguments() {
--user=*)
if test $SET_USER -eq 0
then
- user=`echo "$arg" | sed -e "s;--[^=]*=;;"` ; SET_USER=1
+ user=`echo "$arg" | sed -e "s;--[^=]*=;;"`
fi
+ SET_USER=1
;;
# these two might have been set in a [mysqld_safe] section of my.cnf
@@ -129,7 +130,6 @@ fi
# these rely on $DATADIR by default, so we'll set them later on
pid_file=
err_log=
-SET_USER=0
# Get first arguments from the my.cnf file, groups [mysqld] and [mysqld_safe]
# and then merge with the command line arguments
@@ -147,7 +147,13 @@ else
fi
args=
-parse_arguments `$print_defaults --loose-verbose $defaults mysqld server mysqld_safe safe_mysqld`
+SET_USER=2
+parse_arguments `$print_defaults --loose-verbose $defaults mysqld server`
+if test $SET_USER -eq 2
+then
+ SET_USER=0
+fi
+parse_arguments `$print_defaults --loose-verbose $defaults mysqld_safe safe_mysqld`
parse_arguments PICK-ARGS-FROM-ARGV "$@"
if test ! -x $ledir/$MYSQLD