summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Black <danielgb@au.ibm.com>2016-09-23 17:28:38 +1000
committerholyfoot <holyfoot@mariadb.com>2016-09-23 11:28:38 +0400
commit5d001d13c25c1de1178cc9109e829ef577c9ed73 (patch)
tree38fbc8deb7e76918560fe90a8fd8f40563ea31d2 /scripts
parente136aa1ba7d6a0d4cc38e12a4cdcffaa5f0f01b1 (diff)
downloadmariadb-git-5d001d13c25c1de1178cc9109e829ef577c9ed73.tar.gz
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_install_db.pl.in46
-rw-r--r--scripts/mysql_install_db.sh19
2 files changed, 34 insertions, 31 deletions
diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in
index 8b99b3564e4..3ad733884fb 100644
--- a/scripts/mysql_install_db.pl.in
+++ b/scripts/mysql_install_db.pl.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 )
{
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 1daa1bf58ee..b03c1059605 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -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