diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysqld_multi.sh | 12 | ||||
-rw-r--r-- | scripts/mysqld_safe.sh | 15 |
2 files changed, 21 insertions, 6 deletions
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index ba46fd6fa29..ee873a86c8d 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -4,7 +4,7 @@ use Getopt::Long; use POSIX qw(strftime); $|=1; -$VER="2.11"; +$VER="2.12"; $opt_config_file = undef(); $opt_example = 0; @@ -430,6 +430,16 @@ sub find_groups { $data[$i] = $line; } + if (defined($ENV{MYSQL_HOME}) && -f "$ENV{MYSQL_HOME}/my.cnf" && + -r "$ENV{MYSQL_HOME}/my.cnf") + { + open(MY_CNF, "<$ENV{MYSQL_HOME}/my.cnf") && (@tmp=<MY_CNF>) && + close(MY_CNF); + } + for (; ($line = shift @tmp); $i++) + { + $data[$i] = $line; + } if (-f "$homedir/.my.cnf" && -r "$homedir/.my.cnf") { open(MY_CNF, "<$homedir/.my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF); diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 1f4d17f8885..0e18f137c5a 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -52,11 +52,7 @@ parse_arguments() { # mysqld_safe-specific options - must be set in my.cnf ([mysqld_safe])! --ledir=*) ledir=`echo "$arg" | sed -e "s;--ledir=;;"` ;; - # err-log should be removed in 5.0 - --err-log=*) err_log=`echo "$arg" | sed -e "s;--err-log=;;"` ;; --log-error=*) err_log=`echo "$arg" | sed -e "s;--log-error=;;"` ;; - # QQ The --open-files should be removed in 5.0 - --open-files=*) open_files=`echo "$arg" | sed -e "s;--open-files=;;"` ;; --open-files-limit=*) open_files=`echo "$arg" | sed -e "s;--open-files-limit=;;"` ;; --core-file-size=*) core_file_size=`echo "$arg" | sed -e "s;--core-file-size=;;"` ;; --timezone=*) TZ=`echo "$arg" | sed -e "s;--timezone=;;"` ; export TZ; ;; @@ -94,7 +90,7 @@ then DATADIR=$MY_BASEDIR_VERSION/data if test -z "$defaults" then - defaults="--defaults-extra-file=$MY_BASEDIR_VERSION/data/my.cnf" + defaults="--defaults-extra-file=$DATADIR/my.cnf" fi # Check if this is a 'moved install directory' elif test -f ./var/mysql/db.frm -a -f ./share/mysql/english/errmsg.sys -a \ @@ -106,8 +102,17 @@ then else MY_BASEDIR_VERSION=@prefix@ DATADIR=@localstatedir@ + if test -z "$MYSQL_HOME" + then + MYSQL_HOME=$DATADIR # Installation in a not common path + fi ledir=@libexecdir@ fi +if test -z "$MYSQL_HOME" +then + MYSQL_HOME=$MY_BASEDIR_VERSION +fi +export MYSQL_HOME user=@MYSQLD_USER@ niceness=0 |