[Rt-commit] [svn] r1309 - rt/branches/3.2-RELEASE/sbin
alexmv at pallas.eruditorum.org
alexmv at pallas.eruditorum.org
Wed Aug 4 13:42:45 EDT 2004
Author: alexmv
Date: Wed Aug 4 13:42:42 2004
New Revision: 1309
Modified:
rt/branches/3.2-RELEASE/sbin/rt-setup-database.in
Log:
* Warn if running MySQL < 4.0.x
* Suggest something slightly more useful if we don't have InnoDB and
we're running MySQL 3.23
Modified: rt/branches/3.2-RELEASE/sbin/rt-setup-database.in
==============================================================================
--- rt/branches/3.2-RELEASE/sbin/rt-setup-database.in (original)
+++ rt/branches/3.2-RELEASE/sbin/rt-setup-database.in Wed Aug 4 13:42:42 2004
@@ -108,15 +108,21 @@
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") {
+ # Check which version we're running
+ my ($version) = $dbh->selectrow_hashref("show variables like 'version'")->{Value} =~ /^(\d\.\d+)/;
+ print "*** Warning: RT is unsupported on MySQL versions before 4.0.x\n" if $version < 4;
+
+ # MySQL must have InnoDB support
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"
+ die "RT requires that MySQL InnoDB table support be enabled.\n".
+ ($version < 4
+ ? "Add 'innodb_data_file_path=ibdata1:10M:autoextend' to the [mysqld] section of my.cnf\n"
+ : "Remove the 'skip-innodb' line from your my.cnf file, restart MySQL, and try again.\n");
}
}
More information about the Rt-commit
mailing list