Permalink
Browse files

BUGFIX Fixed Database->requireTable() for Mysql 4.1 (fixes #5517, tha…

…nks gw0) (from r103957)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112326 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent d2c0961 commit 80f609ee419fbc2012d6bd82a2363c264d30e9f2 @chillu chillu committed Oct 14, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/model/Database.php
View
@@ -284,7 +284,7 @@ function requireTable($table, $fieldSchema = null, $indexSchema = null, $hasAuto
if(preg_match('/ENGINE=([^\s]*)/', $options[get_class($this)], $alteredEngineMatches)) {
$alteredEngine = $alteredEngineMatches[1];
$tableStatus = DB::query(sprintf(
- 'SHOW TABLE STATUS WHERE "Name" = \'%s\'',
+ 'SHOW TABLE STATUS LIKE \'%s\'',
$table
))->first();
$tableOptionsChanged = ($tableStatus['Engine'] != $alteredEngine);

0 comments on commit 80f609e

Please sign in to comment.