Issue #2278965 by jhedstrom: Add a warning to the installer for MySQL if an InnoDB-compatible engine is not selected

8.0.x
Alex Pott 2015-06-23 22:04:00 -05:00
parent 9812bb247b
commit b90319a601
2 changed files with 16 additions and 0 deletions

View File

@ -129,6 +129,7 @@ Drupal 8.0, xxxx-xx-xx (development version)
* Added a serialization module using the Symfony serialization component.
* Added a Hypertext Application Language (HAL) serialization module.
* Added a HTTP Basic authentication provider module.
- When using MySQL, the MyISAM engine is no longer supported.
Drupal 7.0, 2011-01-05
----------------------

View File

@ -34,6 +34,10 @@ class Tasks extends InstallTasks {
'The %name database server must support utf8mb4 character encoding to work with Drupal. Make sure to use a database server that supports utf8mb4 character encoding, such as MySQL/MariaDB/Percona versions 5.5.3 and up.',
),
);
$this->tasks[] = array(
'arguments' => array(),
'function' => 'ensureInnoDbAvailable',
);
}
/**
@ -106,4 +110,15 @@ class Tasks extends InstallTasks {
return $form;
}
/**
* Ensure that InnoDB is available.
*/
function ensureInnoDbAvailable() {
$engines = Database::getConnection()->query('SHOW ENGINES')->fetchAllKeyed();
if (isset($engines['MyISAM']) && $engines['MyISAM'] == 'DEFAULT' && !isset($engines['InnoDB'])) {
$this->fail(t('The MyISAM storage engine is not supported.'));
}
}
}