mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Make mysql_fix_privilege_tables.sh not dependent on the current directory.
This commit is contained in:
@ -97,9 +97,11 @@ fi
|
|||||||
|
|
||||||
# Find where 'mysql' command is located
|
# Find where 'mysql' command is located
|
||||||
|
|
||||||
|
dirname=`dirname "$0"`
|
||||||
|
|
||||||
if test -z "$bindir"
|
if test -z "$bindir"
|
||||||
then
|
then
|
||||||
for i in @bindir@ $basedir/bin client
|
for i in @bindir@ $basedir/bin "$dirname/../client"
|
||||||
do
|
do
|
||||||
if test -f $i/mysql
|
if test -f $i/mysql
|
||||||
then
|
then
|
||||||
@ -109,6 +111,13 @@ then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -z "$bindir"
|
||||||
|
then
|
||||||
|
echo "Could not find MySQL command-line client (mysql)."
|
||||||
|
echo "Please use --basedir to specify the directory where MySQL is installed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
cmd="$bindir/mysql --no-defaults --force --user=$user --host=$host"
|
cmd="$bindir/mysql --no-defaults --force --user=$user --host=$host"
|
||||||
if test ! -z "$password" ; then
|
if test ! -z "$password" ; then
|
||||||
cmd="$cmd --password=$password"
|
cmd="$cmd --password=$password"
|
||||||
@ -128,7 +137,7 @@ fi
|
|||||||
|
|
||||||
# Find where first mysql_fix_privilege_tables.sql is located
|
# Find where first mysql_fix_privilege_tables.sql is located
|
||||||
for i in $basedir/support-files $basedir/share $basedir/share/mysql \
|
for i in $basedir/support-files $basedir/share $basedir/share/mysql \
|
||||||
$basedir/scripts $pkgdatadir . ./scripts
|
$basedir/scripts $pkgdatadir . "$dirname"
|
||||||
do
|
do
|
||||||
if test -f $i/$file
|
if test -f $i/$file
|
||||||
then
|
then
|
||||||
|
Reference in New Issue
Block a user