* Finish task #91015.

This commit is contained in:
hufangzhou
2023-04-11 15:31:58 +08:00
parent 2397c644f5
commit 4e05ed02ed
3 changed files with 6 additions and 5 deletions
+1 -2
View File
@@ -410,8 +410,7 @@ class installModel extends model
$tableToLower = strtolower($table);
if(strpos($tableToLower, 'fulltext') !== false and strpos($tableToLower, 'innodb') !== false and $version < 5.6)
{
$this->lang->install->errorCreateTable = $this->lang->install->errorEngineInnodb;
return false;
$table = str_replace('ENGINE=InnoDB', 'ENGINE=MyISAM', $table);
}
$table = str_replace('__DELIMITER__', ';', $table);
+4 -1
View File
@@ -111,11 +111,13 @@ class upgrade extends control
public function confirm()
{
if(strpos($this->post->fromVersion, 'lite') !== false) $this->post->fromVersion = $this->config->upgrade->liteVersion[$this->post->fromVersion];
$confirmSql = $this->upgrade->getConfirm($this->post->fromVersion);
$confirmSql = str_replace('ENGINE=InnoDB', 'ENGINE=MyISAM', $confirmSql);
$this->session->set('step', '');
$this->view->title = $this->lang->upgrade->confirm;
$this->view->position[] = $this->lang->upgrade->common;
$this->view->confirm = $this->upgrade->getConfirm($this->post->fromVersion);
$this->view->confirm = $confirmSql;
$this->view->fromVersion = $this->post->fromVersion;
/* When sql is empty then skip it. */
if(empty($this->view->confirm)) $this->locate(inlink('execute', "fromVersion={$this->post->fromVersion}"));
@@ -865,6 +867,7 @@ class upgrade extends control
{
set_time_limit(0);
$alterSQL = $this->upgrade->checkConsistency();
$alterSQL = str_replace('ENGINE=InnoDB', 'ENGINE=MyISAM', $alterSQL);
if(empty($alterSQL))
{
if(!$netConnect) $this->locate(inlink('selectVersion'));
+1 -2
View File
@@ -2036,8 +2036,7 @@ class upgradeModel extends model
$sqlToLower = strtolower($sql);
if(strpos($sqlToLower, 'fulltext') !== false and strpos($sqlToLower, 'innodb') !== false and $mysqlVersion < 5.6)
{
static::$errors[] = $this->lang->install->errorEngineInnodb;
return false;
$sql = str_replace('ENGINE=InnoDB', 'ENGINE=MyISAM', $sql);
}
$sql = str_replace('zt_', $this->config->db->prefix, $sql);