diff options
author | unknown <cmiller@zippy.cornsilk.net> | 2006-11-15 10:02:51 -0500 |
---|---|---|
committer | unknown <cmiller@zippy.cornsilk.net> | 2006-11-15 10:02:51 -0500 |
commit | 504d8208511f95de07f0523297e9eea7647b64e3 (patch) | |
tree | e770dfb403790622d731f64885ceda68e1fc938a | |
parent | 2eafe74514276a9bc06239efd216506671e05ac6 (diff) | |
parent | 9e05596eb151afe88a7ce45704bea4337915ef12 (diff) | |
download | mariadb-git-504d8208511f95de07f0523297e9eea7647b64e3.tar.gz |
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug17700/my51-bug17700
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
-rw-r--r-- | scripts/mysql_fix_privilege_tables.sh | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/scripts/mysql_fix_privilege_tables.sh b/scripts/mysql_fix_privilege_tables.sh index 8c0c539f3f2..932857890e6 100644 --- a/scripts/mysql_fix_privilege_tables.sh +++ b/scripts/mysql_fix_privilege_tables.sh @@ -119,9 +119,6 @@ then fi cmd="$bindir/mysql --no-defaults --force --user=$user --host=$host" -if test ! -z "$password" ; then - cmd="$cmd --password=$password" -fi if test ! -z "$port"; then cmd="$cmd --port=$port" fi @@ -174,11 +171,22 @@ then s_echo "" fi +run_cmd() { + # Password argument is added here to allow for spaces in password. + + if test ! -z "$password" + then + cat $sql_file | $cmd --password="$password" + else + cat $sql_file | $cmd + fi +} + if test $verbose = 0 then - cat $sql_file | $cmd > /dev/null 2>&1 + run_cmd > /dev/null 2>&1 else - cat $sql_file | $cmd > /dev/null + run_cmd > /dev/null fi if test $? = 0 then |