summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.cornsilk.net>2006-11-15 10:03:54 -0500
committerunknown <cmiller@zippy.cornsilk.net>2006-11-15 10:03:54 -0500
commitce51ceb5e18ca46ed79e6598e2488b9d510a7e4c (patch)
treee8978f31f44225b8e6f52f9df136c2acdb49d42c /scripts
parentcab0dc6544c2e2985bd9bd6c4d3bd07a946070ad (diff)
parent78278bc4f5c53324e895ebc30911da3687db0b53 (diff)
downloadmariadb-git-ce51ceb5e18ca46ed79e6598e2488b9d510a7e4c.tar.gz
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug17700/my41-bug17700
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-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 56807a81d7c..361affae247 100644
--- a/scripts/mysql_fix_privilege_tables.sh
+++ b/scripts/mysql_fix_privilege_tables.sh
@@ -120,9 +120,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