[Rt-commit] [svn] r1178 - in rt/branches/rt-3.1: . sbin

alexmv at pallas.eruditorum.org alexmv at pallas.eruditorum.org
Fri Jul 2 13:13:36 EDT 2004


Author: alexmv
Date: Fri Jul  2 13:13:35 2004
New Revision: 1178

Modified:
   rt/branches/rt-3.1/configure.ac
   rt/branches/rt-3.1/sbin/rt-setup-database.in
Log:
RT-Ticket: 5810
RT-Status: resolved
RT-Update: correspond

 * InnoDB check must be done at database initialization, not configure;
   we can't assume anything about the DSN until then.



Modified: rt/branches/rt-3.1/configure.ac
==============================================================================
--- rt/branches/rt-3.1/configure.ac	(original)
+++ rt/branches/rt-3.1/configure.ac	Fri Jul  2 13:13:35 2004
@@ -86,11 +86,6 @@
 fi
 AC_SUBST(DB_TYPE)
 
-dnl Require InnoDB support with mysql
-if test "$DB_TYPE" = 'mysql'; then
-	test `mysqladmin variables | grep have_innodb | grep YES -c` = '0' && AC_MSG_ERROR([MySQL must have InnoDB support])
-fi
-
 dnl DATABASE_ENV_PREF
 if test "$DB_TYPE" = 'Oracle'; then
 	test "x$ORACLE_HOME" = 'x' && AC_MSG_ERROR([Please declare the ORACLE_HOME environment variable])

Modified: rt/branches/rt-3.1/sbin/rt-setup-database.in
==============================================================================
--- rt/branches/rt-3.1/sbin/rt-setup-database.in	(original)
+++ rt/branches/rt-3.1/sbin/rt-setup-database.in	Fri Jul  2 13:13:35 2004
@@ -87,6 +87,17 @@
         print "...skipped as ".$args{'dba'} ." is not " . $RT::DatabaseUser . " or we're working with Oracle.\n";
     }
 
+    # MySQL must have InnoDB support
+    if ($RT::DatabaseType eq "mysql") {
+        my $innodb = $dbh->selectrow_hashref("show variables like 'have_innodb'")->{Value};
+        if ($innodb eq "NO") {
+            die "RT requires that MySQL be compiled with InnoDB table support.\n".
+              "See http://dev.mysql.com/doc/mysql/en/InnoDB.html\n";
+        } elsif ($innodb eq "DISABLED") {
+            die "RT requires that MySQL be InnoDB table support be enabled.\n".
+              "Remove the 'skip-innodb' line from your my.cnf file, restart MySQL, and try again.\n"
+        }
+    }
     
     # SQLite can't deal with the disconnect/reconnect
     unless ($RT::DatabaseType eq 'SQLite') {


More information about the Rt-commit mailing list