Blame SOURCES/mysql-5.6.16-mysql-install.patch

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