Magento version: 2.1.5 EE
Apache: 2.4.17
PHP: 7.0.10
MySQL: 5.7.9
Durring M2.1.5 EE installation (+sample data), "sequence_*" tables created with MyISAM engine - http://prnt.sc/db1ret , which leads to errors during adding data to such tables (Installation failed on step 6). Reason for such erros - sequence tables are using ForeignKeys, which is not supported by MyISAM.
Other tables are on InnoDB.
The issue itself is related to:
Magento\Framework\DB\Ddl\Sequence :: getCreateSequenceDdl
Here is pure SQL request to create table. And here is no "ENGINE = InnoDB" specified. So, such tables will be created using default MySQL engine, which was set on my WAMP server to MyISAM by default.
Cannot add or update a child row: a foreign key constraint fails (ee215.cms_page, CONSTRAINT CMS_PAGE_PAGE_ID_SEQUENCE_CMS_PAGE_SEQUENCE_VALUE FOREIGN KEY (page_id) REFERENCES sequence_cms_page (sequence_value)
After adding "ENGINE = InnoDB" installation completed without any errors.
You need to know how to configure your database for proper collation, separate file per table, and innodb always! These are basic mysql tasks that must be tended to as part of a proper mysql setup!
Otherwise yeah, your collation will be wrong, your table type will be wrong, and you'll have all your data in one giant DB and LOG pair that can never be shrunk!
All that you wrote is correct. But if you as developer want to use FK on that table, then you should also make sure that you will set correct engine (which support FK) on it's creation. You should never relay on server default configs, since on this server your Magento DB can be not the single one.
You need to know how to configure your database for proper collation
If such a setting was a requirement for Magento, it would make sense to have it listed here and checked automatically during installation.
Otherwise, it's simply a bug.
@IgorVitol, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.
We tested the issue on 2.1.9