You are here

public function Tasks::ensureInnoDbAvailable in Drupal 10

Ensure that InnoDB is available.

File

core/modules/mysql/src/Driver/Database/mysql/Install/Tasks.php, line 184

Class

Tasks
Specifies installation tasks for MySQL and equivalent databases.

Namespace

Drupal\mysql\Driver\Database\mysql\Install

Code

public 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.'));
  }
}