diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/maria_add_gis_sp.sql.in | 4 | ||||
-rw-r--r-- | scripts/mysql_install_db.sh | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/scripts/maria_add_gis_sp.sql.in b/scripts/maria_add_gis_sp.sql.in index 3a5dd49b95b..5826cc1a038 100644 --- a/scripts/maria_add_gis_sp.sql.in +++ b/scripts/maria_add_gis_sp.sql.in @@ -24,12 +24,12 @@ DROP PROCEDURE IF EXISTS AddGeometryColumn; DROP PROCEDURE IF EXISTS DropGeometryColumn; CREATE DEFINER=`root`@`localhost` PROCEDURE AddGeometryColumn(catalog varchar(64), t_schema varchar(64), - t_name varchar(64), geometry_column varchar(64), t_srid int) + t_name varchar(64), geometry_column varchar(64), t_srid int) SQL SECURITY INVOKER begin set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end @ADD_GIS_SP_EOL@ CREATE DEFINER=`root`@`localhost` PROCEDURE DropGeometryColumn(catalog varchar(64), t_schema varchar(64), - t_name varchar(64), geometry_column varchar(64)) + t_name varchar(64), geometry_column varchar(64)) SQL SECURITY INVOKER begin set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end @ADD_GIS_SP_EOL@ diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 52107405525..92e6ed20cff 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -437,7 +437,7 @@ then fi # Create database directories -for dir in "$ldata" "$ldata/mysql" +for dir in "$ldata" do if test ! -d "$dir" then @@ -489,6 +489,7 @@ mysqld_install_cmd_line() cat_sql() { + echo "create database if not exists mysql;" echo "use mysql;" case "$auth_root_authentication_method" in |