7e9daef
We have, for security hardening reasons, changed upstream sources to never
7e9daef
create the test database in 5.7. This patch is a backport from 5.7.
7e9daef
7e9daef
The patch in Fedora is the same that we apply in our own repos. Debian and
7e9daef
Ubuntu are also skipping creation of the test database, so we're trying
7e9daef
to align across distros in this issue.
7e9daef
aedd719
diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in
Bjorn Munch 02226f4
index 1fa5164..4aa49ca 100644
aedd719
--- a/scripts/mysql_install_db.pl.in
aedd719
+++ b/scripts/mysql_install_db.pl.in
Bjorn Munch 02226f4
@@ -113,6 +113,7 @@ EOF2
aedd719
   print <
aedd719
   --rpm                For internal use.  This option is used by RPM files
aedd719
                        during the MySQL installation process.
aedd719
+                       Implies --keep-my-cnf option.
aedd719
   --skip-name-resolve  Use IP addresses rather than hostnames when creating
aedd719
                        grant table entries.  This option can be useful if
aedd719
                        your DNS does not work.
Bjorn Munch 02226f4
@@ -439,7 +440,7 @@ if ( $opt->{srcdir} and $opt->{basedir} )
aedd719
 {
aedd719
   error($opt,"Specify either --basedir or --srcdir, not both");
aedd719
 }
Bjorn Munch 02226f4
-if ( $opt->{'keep-my-cnf'} )
aedd719
+if ( $opt->{rpm} || $opt->{'keep-my-cnf'} )
aedd719
 {
Bjorn Munch 02226f4
   $keep_my_cnf = 1;
aedd719
 }
Bjorn Munch 02226f4
@@ -664,7 +665,7 @@ if ( $opt->{'skip-name-resolve'} and $resolved and $resolved =~ /\s/ )
aedd719
 }
aedd719
 
aedd719
 # ----------------------------------------------------------------------
aedd719
-# Create database directories mysql & test
aedd719
+# Create database directory mysql
aedd719
 # ----------------------------------------------------------------------
aedd719
 
aedd719
 # FIXME The shell variant uses "mkdir -p":
Bjorn Munch 02226f4
@@ -697,7 +698,7 @@ if ($opt_user)
aedd719
   }
aedd719
 }
aedd719
 
aedd719
-foreach my $dir ( $opt->{ldata}, "$opt->{ldata}/mysql", "$opt->{ldata}/test" )
aedd719
+foreach my $dir ( $opt->{ldata}, "$opt->{ldata}/mysql")
aedd719
 {
aedd719
   mkdir($dir, 0700) unless -d $dir;
aedd719
   if ($opt_user and -w "/")