summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2003-10-06 09:24:12 +0200
committerunknown <serg@serg.mylan>2003-10-06 09:24:12 +0200
commit08504cfe276a2ff53ab34a13250220c28702e03c (patch)
treede0da0e25a789198ff97b62cfa201858bbf38a10 /scripts
parentb2fd8218168925cec6c623e855fc3c1d58df5ce9 (diff)
parent907e0555834de14fa1aec538b217dd1f1c3ff23f (diff)
downloadmariadb-git-08504cfe276a2ff53ab34a13250220c28702e03c.tar.gz
Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0 scripts/mysql_config.sh: Auto merged sql/mysqld.cc: Auto merged
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_config.sh2
-rw-r--r--scripts/mysqld_safe.sh22
2 files changed, 14 insertions, 10 deletions
diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh
index 52284104636..6b543bf4a07 100644
--- a/scripts/mysql_config.sh
+++ b/scripts/mysql_config.sh
@@ -62,7 +62,7 @@ get_full_path ()
{
case $1 in
/*) echo "$1";;
- ./*) tmp=`pwd`/$1; echo $tmp | sed -e 's;/./;/;' ;;
+ ./*) tmp=`pwd`/$1; echo $tmp | sed -e 's;/\./;/;' ;;
*) which $1 ;;
esac
}
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 1c056e963cb..ece4ba098f4 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -51,9 +51,9 @@ parse_arguments() {
;;
# these two might have been set in a [mysqld_safe] section of my.cnf
- # they get passed via environment variables to mysqld_safe
- --socket=*) MYSQL_UNIX_PORT=`echo "$arg" | sed -e "s;--socket=;;"` ;;
- --port=*) MYSQL_TCP_PORT=`echo "$arg" | sed -e "s;--port=;;"` ;;
+ # they are added to mysqld command line to override settings from my.cnf
+ --socket=*) mysql_unix_port=`echo "$arg" | sed -e "s;--socket=;;"` ;;
+ --port=*) mysql_tcp_port=`echo "$arg" | sed -e "s;--port=;;"` ;;
# mysqld_safe-specific options - must be set in my.cnf ([mysqld_safe])!
--ledir=*) ledir=`echo "$arg" | sed -e "s;--ledir=;;"` ;;
@@ -114,8 +114,7 @@ else
ledir=@libexecdir@
fi
-MYSQL_UNIX_PORT=${MYSQL_UNIX_PORT:-@MYSQL_UNIX_ADDR@}
-MYSQL_TCP_PORT=${MYSQL_TCP_PORT:-@MYSQL_TCP_PORT@}
+safe_mysql_unix_port=${mysql_unix_port:-${MYSQL_UNIX_PORT:-@MYSQL_UNIX_ADDR@}}
user=@MYSQLD_USER@
niceness=0
@@ -171,9 +170,14 @@ else
fi
test -z "$err_log" && err_log=$DATADIR/`@HOSTNAME@`.err
-export MYSQL_UNIX_PORT
-export MYSQL_TCP_PORT
-
+if test -n "$mysql_unix_port"
+then
+ args="--socket=$mysql_unix_port $args"
+fi
+if test -n "$mysql_tcp_port"
+then
+ args="--port=$mysql_tcp_port $args"
+fi
if test $niceness -eq 0
then
@@ -296,7 +300,7 @@ echo "Starting $MYSQLD daemon with databases from $DATADIR"
echo "`date +'%y%m%d %H:%M:%S mysqld started'`" >> $err_log
while true
do
- rm -f $MYSQL_UNIX_PORT $pid_file # Some extra safety
+ rm -f $safe_mysql_unix_port $pid_file # Some extra safety
if test -z "$args"
then
$NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file @MYSQLD_DEFAULT_SWITCHES@ >> $err_log 2>&1