From 80f609ee419fbc2012d6bd82a2363c264d30e9f2 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 14 Oct 2010 23:52:16 +0000 Subject: [PATCH] BUGFIX Fixed Database->requireTable() for Mysql 4.1 (fixes #5517, thanks gw0) (from r103957) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112326 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/Database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/model/Database.php b/core/model/Database.php index 47f14de79..b45c8c64c 100755 --- a/core/model/Database.php +++ b/core/model/Database.php @@ -284,7 +284,7 @@ abstract class SS_Database { 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);