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
This commit is contained in:
Ingo Schommer 2010-10-14 23:52:16 +00:00
parent d2c096119c
commit 80f609ee41

View File

@ -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);