Mic*_*min 132
该文件的第59行 app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php
更换:
public function supportEngine()
{
$variables = $this->_getConnection()
->fetchPairs('SHOW VARIABLES');
return (!isset($variables['have_innodb']) || $variables['have_innodb'] != 'YES') ? false : true;
}
Run Code Online (Sandbox Code Playgroud)
有了这个:
public function supportEngine()
{
$variables = $this->_getConnection()
->fetchPairs('SHOW ENGINES');
return (isset($variables['InnoDB']) && $variables['InnoDB'] != 'NO');
}
Run Code Online (Sandbox Code Playgroud)
Rok*_*_11 20
或者不做核心黑客攻击!您应该在安装之前轻轻地覆盖Installer-Model:
将其粘贴到您的app/code/local/Company/InstallBugfix/etc/config.xml:
<?xml version="1.0"?>
<config>
<modules>
<Company_InstallBugfix>
<version>0.1.0</version>
</Company_InstallBugfix>
</modules>
<global>
<models>
<installbugfix>
<class>Company_InstallBugfix_Model</class>
</installbugfix>
<install>
<rewrite>
<installer_db_mysql4>Company_InstallBugfix_Model_Installer_Db_Mysql4</installer_db_mysql4>
</rewrite>
</install>
</models>
</global>
</config>
Run Code Online (Sandbox Code Playgroud)
以下是app/code/local/Company/InstallBugfix/Model/Installer/Db/Mysql4.php:
<?php
class Company_InstallBugfix_Model_Installer_Db_Mysql4 extends Mage_Install_Model_Installer_Db_Mysql4
{
/**
* Check InnoDB support
*
* @return bool
*/
public function supportEngine()
{
$supportsEngine = parent::supportEngine();
if ($supportsEngine) {
return true;
}
$variables = $this
->_getConnection()
->fetchPairs('SHOW ENGINES');
return (isset($variables['InnoDB']) && $variables['InnoDB'] != 'NO');
}
}
Run Code Online (Sandbox Code Playgroud)
并启用扩展.如果mysql版本较旧,那么旧验证仍然是正确的.
为使用downloader.php当前捆绑在1.9.1.0安装程序中的任何人提供此功能.
如果您对MySQL数据库在更高版本中支持InnoDB(它是DEFAULT)感到高兴.您可以安全地编辑该文件以删除检查并进行所有下载.
/**
* Check availabe InnoDB on database.
*
* @return Magento_Downloader_Validator
*/
protected function _checkDbInnoDb()
{
if (!$this->_connection) {
return $this;
}
$this->addMessage('Database server supports InnoDB storage engine');
return $this;
}
Run Code Online (Sandbox Code Playgroud)