summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-07-15 04:19:07 +0300
committermonty@mysql.com <>2004-07-15 04:19:07 +0300
commit5b3c418b4835c688b0859a3e82d0280cd177e52a (patch)
treee83d5aa4118851b076ed870c7e9c5fd8b5bb53ef /scripts
parent31fe2837f9c0579454cba635ee127536a6ac55ce (diff)
downloadmariadb-git-5b3c418b4835c688b0859a3e82d0280cd177e52a.tar.gz
After merge fixes
Note: The following tests fails - fulltext (Sergei has promised to fix) - rpl_charset (Guilhem should fix) - rpl_timezone (Dimitray has promised to fix) Sanja needs to check out the calling of close_thread_tables() in sp_head.cc
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_fix_privilege_tables.sh45
1 files changed, 18 insertions, 27 deletions
diff --git a/scripts/mysql_fix_privilege_tables.sh b/scripts/mysql_fix_privilege_tables.sh
index 79b4bc627b7..6a0618fc1b5 100644
--- a/scripts/mysql_fix_privilege_tables.sh
+++ b/scripts/mysql_fix_privilege_tables.sh
@@ -7,13 +7,14 @@ password=""
host="localhost"
user="root"
sql_only=0
-basedir=""
+basedir="@prefix@"
verbose=0
args=""
port=""
socket=""
database="mysql"
bindir=""
+pkgdatadir="@pkgdatadir@"
file=mysql_fix_privilege_tables.sql
@@ -85,34 +86,23 @@ done
parse_arguments `$print_defaults $defaults mysql_install_db mysql_fix_privilege_tables`
parse_arguments PICK-ARGS-FROM-ARGV "$@"
-if test -z "$basedir"
+if test -z "$password"
then
- basedir=@prefix@
- if test -z "$bindir"
- then
- bindir=@bindir@
- fi
- execdir=@libexecdir@
- pkgdatadir=@pkgdatadir@
-else
- if test -z "$bindir"
- then
- bindir="$basedir/bin"
- fi
- if test -x "$basedir/libexec/mysqld"
- then
- execdir="$basedir/libexec"
- elif test -x "@libexecdir@/mysqld"
- then
- execdir="@libexecdir@"
- else
- execdir="$basedir/bin"
- fi
+ password=$old_style_password
fi
-if test -z "$password"
+# Find where 'mysql' command is located
+
+if test -z "$bindir"
then
- password=$old_style_password
+ for i in @bindir@ $basedir/bin client
+ do
+ if test -f $i/mysql
+ then
+ bindir=$i
+ break
+ fi
+ done
fi
cmd="$bindir/mysql -f --user=$user --host=$host"
@@ -134,7 +124,7 @@ fi
# Find where first mysql_fix_privilege_tables.sql is located
for i in $basedir/support-files $basedir/share $basedir/share/mysql \
- $basedir/scripts @pkgdatadir@ . ./scripts
+ $basedir/scripts $pkgdatadir . ./scripts
do
if test -f $i/$file
then
@@ -163,7 +153,8 @@ s_echo "This scripts updates all the mysql privilege tables to be usable by"
s_echo "MySQL 4.0 and above."
s_echo ""
s_echo "This is needed if you want to use the new GRANT functions,"
-s_echo "CREATE AGGREGATE FUNCTION or want to use the more secure passwords in 4.1"
+s_echo "CREATE AGGREGATE FUNCTION, use stored procedures or want to use the"
+s_echo "more secure passwords in 4.1"
s_echo ""
if test $verbose = 1