Commit 82bbaaf6 authored by unknown's avatar unknown

Apply a few more cleanups to improve the robustness of mysql_install_db


scripts/mysql_install_db.sh:
  Put back variable initialisation for those which could be passed
  in via the environment and confuse the script.
parent 17136906
...@@ -18,6 +18,15 @@ ...@@ -18,6 +18,15 @@
# #
# All unrecognized arguments to this script are passed to mysqld. # All unrecognized arguments to this script are passed to mysqld.
basedir=""
ldata=""
srcdir=""
args=""
defaults=""
mysqld_opt=""
user=""
force=0 force=0
in_rpm=0 in_rpm=0
ip_only=0 ip_only=0
...@@ -87,7 +96,8 @@ parse_arguments() ...@@ -87,7 +96,8 @@ parse_arguments()
shift shift
fi fi
for arg do for arg
do
case "$arg" in case "$arg" in
--force) force=1 ;; --force) force=1 ;;
--basedir=*) basedir=`parse_arg "$arg"` ;; --basedir=*) basedir=`parse_arg "$arg"` ;;
...@@ -203,11 +213,10 @@ then ...@@ -203,11 +213,10 @@ then
mysqld="./sql/mysqld" mysqld="./sql/mysqld"
if test -n "$srcdir" -a -f "$srcdir/sql/share/english/errmsg.sys" if test -n "$srcdir" -a -f "$srcdir/sql/share/english/errmsg.sys"
then then
langdir="$srcdir/sql/share/english" mysqld_opt="--language=$srcdir/sql/share/english"
else else
langdir="./sql/share/english" mysqld_opt="./sql/share/english"
fi fi
mysqld_opt="--language=$langdir"
fi fi
# Make sure mysqld is available in default location (--basedir option is # Make sure mysqld is available in default location (--basedir option is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment