summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorserg@serg.mylan <>2004-06-10 13:58:32 +0200
committerserg@serg.mylan <>2004-06-10 13:58:32 +0200
commit3d36d97efb2cc9454f44d2b941c87420e5d44791 (patch)
tree8a6257874fdea272828d6dc08f2f3a48830d2dfb
parent4bd441850c3350c1d4a95109edcce6d557e8237b (diff)
parent56478093505dd4af1170a46d159033eb0cb9d359 (diff)
downloadmariadb-git-3d36d97efb2cc9454f44d2b941c87420e5d44791.tar.gz
Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
-rw-r--r--scripts/mysqld_safe.sh8
-rw-r--r--sql/mysqld.cc2
2 files changed, 2 insertions, 8 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 779438e75c3..7b77bf449cd 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -43,13 +43,7 @@ parse_arguments() {
--basedir=*) MY_BASEDIR_VERSION=`echo "$arg" | sed -e "s;--basedir=;;"` ;;
--datadir=*) DATADIR=`echo "$arg" | sed -e "s;--datadir=;;"` ;;
--pid-file=*) pid_file=`echo "$arg" | sed -e "s;--pid-file=;;"` ;;
- --user=*)
- if test $SET_USER -eq 0
- then
- user=`echo "$arg" | sed -e "s;--[^=]*=;;"`
- fi
- SET_USER=1
- ;;
+ --user=*) user=`echo "$arg" | sed -e "s;--[^=]*=;;"` ; SET_USER=1 ;;
# these two 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
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 3cd42dbeac1..80e9292a873 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -4624,7 +4624,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
mysql_data_home= mysql_real_data_home;
break;
case 'u':
- if (!mysqld_user)
+ if (!mysqld_user || !strcmp(mysqld_user, argument))
mysqld_user= argument;
else
fprintf(stderr, "Warning: Ignoring user change to '%s' because the user was set to '%s' earlier on the command line\n", argument, mysqld_user);