mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-10830 - Fix undefined database test error when running mysql_install_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
This commit is contained in:
@@ -508,7 +508,7 @@ if ( open(PIPE, "| $mysqld_install_cmd_line") )
|
|||||||
# FIXME > /dev/null ?
|
# FIXME > /dev/null ?
|
||||||
if ( open(PIPE, "| $mysqld_install_cmd_line") )
|
if ( open(PIPE, "| $mysqld_install_cmd_line") )
|
||||||
{
|
{
|
||||||
print PIPE "use test;\n";
|
print PIPE "use mysql;\n";
|
||||||
while ( <SQL> )
|
while ( <SQL> )
|
||||||
{
|
{
|
||||||
print PIPE $_;
|
print PIPE $_;
|
||||||
|
@@ -473,7 +473,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
s_echo "Creating OpenGIS required SP-s..."
|
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
|
then
|
||||||
s_echo "OK"
|
s_echo "OK"
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user