summaryrefslogtreecommitdiff
path: root/scripts/mysql_install_db.pl.in
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2015-03-17 14:44:59 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2015-03-17 14:44:59 +0400
commit015994f226cfa94e6d339fdc0de670a054f631b4 (patch)
treeb577b6af0805ea5c6e847bbf21cd9334a910cc6a /scripts/mysql_install_db.pl.in
parentccc7297fe94af1129c717f91d31fa075d54a0371 (diff)
downloadmariadb-git-015994f226cfa94e6d339fdc0de670a054f631b4.tar.gz
MDEV-7515 GIS: No AddGeometryColumn or DropGeometryColumn in the tree.
Installation scripts added to setup the required SP-s with the mysql_install_db.
Diffstat (limited to 'scripts/mysql_install_db.pl.in')
-rw-r--r--scripts/mysql_install_db.pl.in29
1 files changed, 28 insertions, 1 deletions
diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in
index 4d3641397d0..8a3492c8756 100644
--- a/scripts/mysql_install_db.pl.in
+++ b/scripts/mysql_install_db.pl.in
@@ -348,8 +348,9 @@ if ( $opt->{srcdir} )
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";
-foreach my $f ( $fill_help_tables,$create_system_tables,$fill_system_tables )
+foreach my $f ( $fill_help_tables,$create_system_tables,$fill_system_tables,$maria_add_gis_sp )
{
-f $f or cannot_find_file($f);
}
@@ -496,6 +497,32 @@ if ( open(PIPE, "| $mysqld_install_cmd_line") )
"The \"HELP\" command might not work properly");
}
+ # ----------------------------------------------------------------------
+ # Pipe maria_add_gis_sp.sql to "mysqld --bootstrap"
+ # ----------------------------------------------------------------------
+
+ report_verbose_wait($opt,"Creating OpenGIS required SP-s...");
+ open(SQL, $maria_add_gis_sp)
+ or error($opt,"can't open $maria_add_gis_sp for reading: $!");
+ # FIXME > /dev/null ?
+ if ( open(PIPE, "| $mysqld_install_cmd_line") )
+ {
+ print PIPE "use test;\n";
+ while ( <SQL> )
+ {
+ print PIPE $_;
+ }
+ close PIPE;
+ close SQL;
+
+ report_verbose($opt,"OK");
+ }
+ else
+ {
+ warning($opt,"OPENGIS REQUIRED SP-S WERE NOT COMPLETELY INSTALLED!",
+ "GIS extentions might not work properly");
+ }
+
report_verbose($opt,"To start mysqld at boot time you have to copy",
"support-files/mysql.server to the right place " .
"for your system");