mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-10832 - Out of tree build: mysql_install_db to see all .sql files (#237)
* Out of tree build: mysql_install_db to see all .sql files
Since MDEV-7875 (da0991c6
), not all sql source files are in the source
directory, maria_add_gis_sp_bootstrap.sql is in the build directory.
This corrects mysql_install_db{.sh} to be aware of the differing
locations.
Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
* Out of tree build: scripts/mysql_install_db.pl.in
Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
This commit is contained in:
@@ -297,17 +297,19 @@ parse_arguments($opt, 'PICK-ARGS-FROM-ARGV', @ARGV);
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# FIXME $extra_bindir is not used
|
||||
my ($bindir,$extra_bindir,$mysqld,$pkgdatadir,$mysqld_opt,$scriptdir);
|
||||
my ($bindir,$extra_bindir,$mysqld,$srcpkgdatadir,$buildpkgdatadir,$mysqld_opt,
|
||||
$scriptdir);
|
||||
|
||||
if ( $opt->{srcdir} )
|
||||
{
|
||||
$opt->{basedir} = $opt->{builddir};
|
||||
$bindir = "$opt->{basedir}/client";
|
||||
$extra_bindir = "$opt->{basedir}/extra";
|
||||
$mysqld = "$opt->{basedir}/sql/mysqld";
|
||||
$mysqld_opt = "--language=$opt->{srcdir}/sql/share/english";
|
||||
$pkgdatadir = "$opt->{srcdir}/scripts";
|
||||
$scriptdir = "$opt->{srcdir}/scripts";
|
||||
$opt->{basedir} = $opt->{builddir};
|
||||
$bindir = "$opt->{basedir}/client";
|
||||
$extra_bindir = "$opt->{basedir}/extra";
|
||||
$mysqld = "$opt->{basedir}/sql/mysqld";
|
||||
$mysqld_opt = "--language=$opt->{srcdir}/sql/share/english";
|
||||
$srcpkgdatadir = "$opt->{srcdir}/scripts";
|
||||
$buildpkgdatadir = "$opt->{builddir}/scripts";
|
||||
$scriptdir = "$opt->{srcdir}/scripts";
|
||||
}
|
||||
elsif ( $opt->{basedir} )
|
||||
{
|
||||
@@ -317,18 +319,20 @@ elsif ( $opt->{basedir} )
|
||||
"libexec","sbin","bin") || # ,"sql"
|
||||
find_in_basedir($opt,"file","mysqld-nt",
|
||||
"bin"); # ,"sql"
|
||||
$pkgdatadir = find_in_basedir($opt,"dir","fill_help_tables.sql",
|
||||
$srcpkgdatadir = find_in_basedir($opt,"dir","fill_help_tables.sql",
|
||||
"share","share/mysql"); # ,"scripts"
|
||||
$buildpkgdir = $srcpkgdatadir;
|
||||
$scriptdir = "$opt->{basedir}/scripts";
|
||||
}
|
||||
else
|
||||
{
|
||||
$opt->{basedir} = '@prefix@';
|
||||
$bindir = '@bindir@';
|
||||
$extra_bindir = $bindir;
|
||||
$mysqld = '@libexecdir@/mysqld';
|
||||
$pkgdatadir = '@pkgdatadir@';
|
||||
$scriptdir = '@scriptdir@';
|
||||
$opt->{basedir} = '@prefix@';
|
||||
$bindir = '@bindir@';
|
||||
$extra_bindir = $bindir;
|
||||
$mysqld = '@libexecdir@/mysqld';
|
||||
$srcpkgdatadir = '@pkgdatadir@';
|
||||
$buildpkgdatadir = '@pkgdatadir@';
|
||||
$scriptdir = '@scriptdir@';
|
||||
}
|
||||
|
||||
unless ( $opt->{ldata} )
|
||||
@@ -336,19 +340,15 @@ unless ( $opt->{ldata} )
|
||||
$opt->{ldata} = '@localstatedir@';
|
||||
}
|
||||
|
||||
if ( $opt->{srcdir} )
|
||||
{
|
||||
$pkgdatadir = "$opt->{srcdir}/scripts";
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Set up paths to SQL scripts required for bootstrap
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
my $fill_help_tables = "$pkgdatadir/fill_help_tables.sql";
|
||||
my $create_system_tables = "$pkgdatadir/mysql_system_tables.sql";
|
||||
my $fill_system_tables = "$pkgdatadir/mysql_system_tables_data.sql";
|
||||
my $maria_add_gis_sp = "$pkgdatadir/maria_add_gis_sp_bootstrap.sql";
|
||||
my $fill_help_tables = "$srcpkgdatadir/fill_help_tables.sql";
|
||||
my $create_system_tables = "$srcpkgdatadir/mysql_system_tables.sql";
|
||||
my $fill_system_tables = "$srcpkgdatadir/mysql_system_tables_data.sql";
|
||||
my $maria_add_gis_sp = "$buildpkgdatadir/maria_add_gis_sp_bootstrap.sql";
|
||||
|
||||
foreach my $f ( $fill_help_tables,$create_system_tables,$fill_system_tables,$maria_add_gis_sp )
|
||||
{
|
||||
|
@@ -270,7 +270,8 @@ then
|
||||
extra_bindir="$basedir/extra"
|
||||
mysqld="$basedir/sql/mysqld"
|
||||
langdir="$basedir/sql/share/english"
|
||||
pkgdatadir="$srcdir/scripts"
|
||||
srcpkgdatadir="$srcdir/scripts"
|
||||
buildpkgdatadir="$builddir/scripts"
|
||||
scriptdir="$srcdir/scripts"
|
||||
elif test -n "$basedir"
|
||||
then
|
||||
@@ -288,7 +289,8 @@ then
|
||||
cannot_find_file errmsg.sys $basedir/share/english $basedir/share/mysql/english
|
||||
exit 1
|
||||
fi
|
||||
pkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql`
|
||||
srcpkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql`
|
||||
buildpkgdatadir=$srcpkgdatadir
|
||||
if test -z "$pkgdatadir"
|
||||
then
|
||||
cannot_find_file fill_help_tables.sql $basedir/share $basedir/share/mysql
|
||||
@@ -300,16 +302,17 @@ else
|
||||
bindir="@bindir@"
|
||||
extra_bindir="$bindir"
|
||||
mysqld="@libexecdir@/mysqld"
|
||||
pkgdatadir="@pkgdatadir@"
|
||||
srcpkgdatadir="@pkgdatadir@"
|
||||
buildpkgdatadir="@pkgdatadir@"
|
||||
scriptdir="@scriptdir@"
|
||||
fi
|
||||
|
||||
# Set up paths to SQL scripts required for bootstrap
|
||||
fill_help_tables="$pkgdatadir/fill_help_tables.sql"
|
||||
create_system_tables="$pkgdatadir/mysql_system_tables.sql"
|
||||
create_system_tables2="$pkgdatadir/mysql_performance_tables.sql"
|
||||
fill_system_tables="$pkgdatadir/mysql_system_tables_data.sql"
|
||||
maria_add_gis_sp="$pkgdatadir/maria_add_gis_sp_bootstrap.sql"
|
||||
fill_help_tables="$srcpkgdatadir/fill_help_tables.sql"
|
||||
create_system_tables="$srcpkgdatadir/mysql_system_tables.sql"
|
||||
create_system_tables2="$srcpkgdatadir/mysql_performance_tables.sql"
|
||||
fill_system_tables="$srcpkgdatadir/mysql_system_tables_data.sql"
|
||||
maria_add_gis_sp="$buildpkgdatadir/maria_add_gis_sp_bootstrap.sql"
|
||||
|
||||
for f in "$fill_help_tables" "$create_system_tables" "$create_system_tables2" "$fill_system_tables" "$maria_add_gis_sp"
|
||||
do
|
||||
|
Reference in New Issue
Block a user