Commit b90319a6 authored by alexpott's avatar alexpott

Issue #2278965 by jhedstrom: Add a warning to the installer for MySQL if an...

Issue #2278965 by jhedstrom: Add a warning to the installer for MySQL if an InnoDB-compatible engine is not selected
parent 9812bb24
......@@ -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
----------------------
......
......@@ -34,6 +34,10 @@ public function __construct() {
'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 @@ public function getFormOptions(array $database) {
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.'));
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment