Commit 021242bc authored by serg@serg.mylan's avatar serg@serg.mylan

mysql_fix_privilege_tables.sh:

  various fixes (for mysql-test-run at least):
  * accept --no-defaults
  * 4.0 compatible password handling (only it no other argumensts, only if doesn't start with --)
ps_3innodb.test:
  only run ps_3innodb.test if innodb is present
mysql-test-run.sh:
  it's --verbose, not --verbose=1
parent df1f83db
......@@ -525,7 +525,7 @@ fi
MYSQL_DUMP="$MYSQL_DUMP --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR $EXTRA_MYSQLBINLOG_OPT"
MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose=1"
MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose"
MYSQL="$MYSQL --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD"
export MYSQL MYSQL_DUMP MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES CLIENT_BINDIR
......
......@@ -10,6 +10,8 @@
use test;
-- source include/have_innodb.inc
let $type= 'InnoDB' ;
-- source include/ps_create.inc
-- source include/ps_renew.inc
......
......@@ -17,8 +17,24 @@ bindir=""
file=mysql_fix_privilege_tables.sql
# The following test is to make this script compatible with the 4.0 where
# the single argument could be a password
if test "$#" = 1
then
case "$1" in
--*) ;;
*) old_style_password="$1" ; shift ;;
esac
fi
# The following code is almost identical to the code in mysql_install_db.sh
case "$1" in
--no-defaults|--defaults-file=*|--defaults-extra-file=*)
defaults="$1"; shift
;;
esac
parse_arguments() {
# We only need to pass arguments through to the server if we don't
# handle them here. So, we collect unrecognized options (passed on
......@@ -36,7 +52,7 @@ parse_arguments() {
--user=*) user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--password=*) password=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--host=*) host=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--sql|--sql-only) sql_only=1;;
--sql|--sql-only) sql_only=1 ;;
--verbose) verbose=1 ;;
--port=*) port=`echo "$arg" | sed -e "s;--port=;;"` ;;
--socket=*) socket=`echo "$arg" | sed -e "s;--socket=;;"` ;;
......@@ -47,7 +63,7 @@ parse_arguments() {
then
# This sed command makes sure that any special chars are quoted,
# so the arg gets passed exactly to the server.
args="$args "`echo "$arg" | sed -e 's,\([^a-zA-Z0-9_.-]\),\\\\\1,g'`
args="$args "`echo "$arg" | sed -e 's,\([^=a-zA-Z0-9_.-]\),\\\\\1,g'`
fi
;;
esac
......@@ -94,11 +110,9 @@ else
fi
fi
# The following test is to make this script compatible with the 4.0 where
# the first argument was the password
if test -z "$password"
then
password=`echo $args | sed -e 's/ *//g'`
password=$old_style_password
fi
cmd="$bindir/mysql -f --user=$user --host=$host"
......
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