Skip to content

Commit

Permalink
MDEV-10830 - Fix undefined database test error when running mysql_ins…
Browse files Browse the repository at this point in the history
…tall_db (#234)

* Fix undefined database test error when running mysql_install_db

When using mariaDb in docker mode it can fail as it calls mysql_install_db but as we are going through a slightly different install process the test database has not been created, therefore we should fall back to the mysql database as per https://mariadb.com/kb/en/mariadb/mariadb-10112-mysql_install_db-aborts-on-unkown-file-test/

* Also fix mysql_install_db.pl.in
  • Loading branch information
seamuslee001 authored and holyfoot committed Sep 22, 2016
1 parent 9f837c6 commit e387bfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/mysql_install_db.pl.in
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ if ( open(PIPE, "| $mysqld_install_cmd_line") )
# FIXME > /dev/null ?
if ( open(PIPE, "| $mysqld_install_cmd_line") )
{
print PIPE "use test;\n";
print PIPE "use mysql;\n";
while ( <SQL> )
{
print PIPE $_;
Expand Down
2 changes: 1 addition & 1 deletion scripts/mysql_install_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ else
fi

s_echo "Creating OpenGIS required SP-s..."
if { echo "use test;"; cat "$maria_add_gis_sp"; } | mysqld_install_cmd_line > /dev/null
if { echo "use mysql;"; cat "$maria_add_gis_sp"; } | mysqld_install_cmd_line > /dev/null
then
s_echo "OK"
else
Expand Down

0 comments on commit e387bfa

Please sign in to comment.