summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.cornsilk.net>2006-11-15 10:01:50 -0500
committerunknown <cmiller@zippy.cornsilk.net>2006-11-15 10:01:50 -0500
commit5b3cfaa8d7d770e91fcb1339405aeb16ffcac8b8 (patch)
tree660c937644039f999e3f07508bf9a670f66a9036 /scripts
parent8f1337add446faf5cc0b5f742c0eb773a97031ad (diff)
parent574902e355362f70e888c57698ec9147f69a6351 (diff)
downloadmariadb-git-5b3cfaa8d7d770e91fcb1339405aeb16ffcac8b8.tar.gz
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug17700/my50-bug17700
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_fix_privilege_tables.sh18
1 files changed, 13 insertions, 5 deletions
diff --git a/scripts/mysql_fix_privilege_tables.sh b/scripts/mysql_fix_privilege_tables.sh
index 073964d4bde..910992191f3 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
@@ -178,11 +175,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