Problem/Motivation

#2275535: [policy, no patch] Drop support for non-transactional database engines (including MyISAM) sets a policy that we will no longer support MyISAM as the primary storage engine for MySQL in D8. (Drupal 7 already changed the default to InnoDB, but we still supported MyISAM in Drupal 7. Our handbook pages have been updated, however, we need to also warn users if they try to install with MyISAM.

Proposed resolution

  • Add a warning/error to the installer if:
    1. The site is being installed with MySQL.
    2. MyISAM is the default storage engine.
    3. InnoDB (nor any of the current alternatives that report themselves as it) is not available.
  • Add a CHANGELOG.txt entry documenting this change in the support policy.

Remaining tasks

  • Create the patch to add the installer warning and CHANGELOG entry.
  • Review/update mentions of "MyISAM" in the D8 codebase:
    grep -ri "MyISAM" *
    core/CHANGELOG.txt:    * Default to InnoDB engine, rather than MyISAM, on MySQL when available.
    core/INSTALL.mysql.txt:tables. InnoDB provides features over MyISAM such as transaction support,
    core/lib/Drupal/Core/Database/Transaction.php: * example, MySQL MyISAM tables do not. It is also easy to begin a transaction
    core/modules/system/src/Tests/Database/InvalidDataTest.php:          // when running on a MyISAM table.
    sites/default/default.settings.php: * Note that some configurations of MySQL, such as the MyISAM engine, don't
  • And in the handbook:
    https://drupal.org/search/site/myisam?f[0]=ss_meta_type%3Adocumentation

User interface changes

Installer warning if MyISAM is the default and there is no InnoDB-compatible option.

API changes

Should be none.

CommentFileSizeAuthor
#7 add-myisam-warning-2278965-07.patch1.67 KBjhedstrom

Comments

chx’s picture

We shouldn't. To quote catch from the parent

I did a google search for innodb not supported and the first page of results was mainly people getting warnings from Magento's installer or similar about it not being supported on obscure shared hosting plans in 2008/9.

To quote myself

Drupal 8 is going to be out there for 5-6 years how do you know what awesome engines will show up and take the world by storm?

Based on these two, there's no reason to do this and a good reason not to.

Alternatively, we can do this for launch and drop it later -- but usually it is very hard to remove anything from core once it's got in so I'd like to establish some deadline (one year from 8.0.0 or something) when we drop it. Future proofing Drupal, you know.

catch’s picture

Right now Drupal installs with InnoDB if it's available. So if other engines show up, unless the report themselves as InnoDB, they'll be ignored by the installer.

Additionally I think we should only warn if both MyISAM is the default and nothing shows up as InnoDB.

It might even be possible to get more reliable than this - i.e. could we create a table, see which engine it's created with, and only warn if it's MyISAM?

chx’s picture

> It might even be possible to get more reliable than this - i.e. could we create a table, see which engine it's created with, and only warn if it's MyISAM?

Smart. I definitely can get behind that.

morgantocker’s picture

For some MySQL version context:
- 5.5 and above default to InnoDB.
- 5.6 and above have NO_ENGINE_SUBSTITUTION enabled by default (will not switch to another engine if the engine specified is not available).

chx’s picture

Welcome to the core issue queue, Mr Tocker, I don't think I have seen you before here, your expertise is more than welcome!

danblack’s picture

all for the sidelining of MyISAM here. Tokudb probably works just as well as innodb but I haven't tested it. So just warning about an exclusive innodb test isn't he best one.

jhedstrom’s picture

Status: Active » Needs review
StatusFileSize
new1.67 KB

This updates the CHANGELOG.txt file, and adds a warning if MyISAM is the default, and InnoDB is not available.

daffie’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

This issue is a major task that will improve usability and the disruption it introduces is limited. Per https://www.drupal.org/core/beta-changes, this is a good change to complete during the Drupal 8 beta phase. Committed b90319a and pushed to 8.0.x. Thanks!

I couldn't think of a way to test this.

  • alexpott committed b90319a on 8.0.x
    Issue #2278965 by jhedstrom: Add a warning to the installer for MySQL if...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.