From b90319a601f9bb381f5c7eee70663fe7af61075d Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Tue, 23 Jun 2015 22:04:00 -0500
Subject: [PATCH] Issue #2278965 by jhedstrom: Add a warning to the installer
 for MySQL if an InnoDB-compatible engine is not selected

---
 core/CHANGELOG.txt                                |  1 +
 .../Core/Database/Driver/mysql/Install/Tasks.php  | 15 +++++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/core/CHANGELOG.txt b/core/CHANGELOG.txt
index 07a43f8aa871..df80cfbb8fbf 100644
--- a/core/CHANGELOG.txt
+++ b/core/CHANGELOG.txt
@@ -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
 ----------------------
diff --git a/core/lib/Drupal/Core/Database/Driver/mysql/Install/Tasks.php b/core/lib/Drupal/Core/Database/Driver/mysql/Install/Tasks.php
index 02c41e678d70..202d0561ab2c 100644
--- a/core/lib/Drupal/Core/Database/Driver/mysql/Install/Tasks.php
+++ b/core/lib/Drupal/Core/Database/Driver/mysql/Install/Tasks.php
@@ -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.'));
+    }
+  }
+
 }
-- 
GitLab