aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-03-11 09:07:13 +0000
committermkanat%bugzilla.org <>2007-03-11 09:07:13 +0000
commit5f7218dece9661ce08a760c92927e2101b546de7 (patch)
treeca0e517b14a2922e8367783c90a7c824d2691ff8 /Bugzilla/DB
parent1643c9140b317ed9c32cd5ab01b816ad2f2b0310 (diff)
downloadbugs-5f7218dece9661ce08a760c92927e2101b546de7.tar
bugs-5f7218dece9661ce08a760c92927e2101b546de7.tar.gz
bugs-5f7218dece9661ce08a760c92927e2101b546de7.tar.bz2
bugs-5f7218dece9661ce08a760c92927e2101b546de7.tar.xz
bugs-5f7218dece9661ce08a760c92927e2101b546de7.zip
Bug 373511: InnoDB conversion can fail silently
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=mkanat
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r--Bugzilla/DB/Mysql.pm18
1 files changed, 18 insertions, 0 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm
index 2e8643fb0..582a2a7b8 100644
--- a/Bugzilla/DB/Mysql.pm
+++ b/Bugzilla/DB/Mysql.pm
@@ -257,6 +257,24 @@ sub _bz_get_initial_schema {
sub bz_setup_database {
my ($self) = @_;
+ # Make sure the installation has InnoDB turned on, or we're going to be
+ # doing silly things like making foreign keys on MyISAM tables, which is
+ # hard to fix later. We do this up here because none of the code below
+ # works if InnoDB is off. (Particularly if we've already converted the
+ # tables to InnoDB.)
+ my ($innodb_on) = @{$self->selectcol_arrayref(
+ q{SHOW VARIABLES LIKE '%have_innodb%'}, {Columns=>[2]})};
+ if ($innodb_on ne 'YES') {
+ print <<EOT;
+InnoDB is disabled in your MySQL installation.
+Bugzilla requires InnoDB to be enabled.
+Please enable it and then re-run checksetup.pl.
+
+EOT
+ exit 3;
+ }
+
+
# Figure out if any existing tables are of type ISAM and convert them
# to type MyISAM if so. ISAM tables are deprecated in MySQL 3.23,
# which Bugzilla now requires, and they don't support more than 16