diff options
author | unknown <serg@serg.mylan> | 2004-07-06 16:29:26 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-07-06 16:29:26 +0200 |
commit | 68aec1e48d58dd8251324ca4f6fc886d627d89af (patch) | |
tree | 85668468b77e9e396ee280f84e688ff73152d238 /scripts | |
parent | 692f440b42a685da5414c8612d0e022f501d77f6 (diff) | |
download | mariadb-git-68aec1e48d58dd8251324ca4f6fc886d627d89af.tar.gz |
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
mysql-test/mysql-test-run.sh:
it's --verbose, not --verbose=1
mysql-test/t/ps_3innodb.test:
only run ps_3innodb.test if innodb is present
scripts/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 --)
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysql_fix_privilege_tables.sh | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/scripts/mysql_fix_privilege_tables.sh b/scripts/mysql_fix_privilege_tables.sh index f3c5c009f1c..79b4bc627b7 100644 --- a/scripts/mysql_fix_privilege_tables.sh +++ b/scripts/mysql_fix_privilege_tables.sh @@ -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" |