Problem/Motivation
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-9.html shows that MySQL 5.7.9 was the first generally available release of MySQL 5.7
Unfortunately core has at least two fatal errors with it:
#2616282: error creating migrate_map table with mysql 5.7.9
#2388139: Installation error MYSQL Primary key is null with MySQL 5.7 on block_content_revision
Proposed resolution
Fix them, and add a MySQL 5.7 environment to DrupalCI.
If this issue isn't fixed in time for 8.0.0, we should add a note to the release notes and drupal.org/requirements pointing out the incompatibility.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork drupal-2616488
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 2616488-meta-mysql-5.7-pan compare
- 2616488-meta-mysql-5.7 compare
Comments
Comment #2
steinmb CreditAttribution: steinmb as a volunteer commentedFrom my understanding goes this also for MariaDB 10.1.x https://mariadb.com/kb/en/mariadb/system-variable-differences-between-ma...
We might also have a D7 problem. My server just plainly refused to start on 10.1.8 in homebrew failing with:
Worked OK when I stepped back to 10.0.x.
Comment #3
catchUpdating issue title, 10.1.8 was the first stable for 10.1, and October 17th.
Comment #4
steinmb CreditAttribution: steinmb as a volunteer commentedThink It should be 10.1
Comment #5
catchYes, yes it should.
It looks like the block / contact errors might not be 5.7 incompatibilities in core - marked both 'needs more info'.
If that's the case, then only {migrate_map} is incompatible, and given migrate is experimental that wouldn't in itself be an issue.
I opened #2616724: Warn when trying to create a database table with a NOT NULL => FALSE primary key to validate this in PHP, which would help contrib/custom database tables be 5.7 compatible.
If it's really only migrate_map that's actually a problem in core, then we can probably say 'not yet fully tested on MySQL 5.7' as opposed to 'does not install on 5.7' which would be a less bad d.o/requirements/release notes note.
Comment #6
alexpott#2388139: Installation error MYSQL Primary key is null with MySQL 5.7 on block_content_revision has been fixed.
Comment #7
catchCommitted #2616282: error creating migrate_map table with mysql 5.7.9 .
Leaving this open for tracking the DrupalCI environment, and possibly doing our own validation in the database layer, but as far as we know we're compatible now - so moving to major.
Could still use a d.o/requirements update to indicate we don't test on MySQL 5.7 yet.
Comment #8
catchTagging 8.0.1 target, but also postponing on #2616490: MySQL 5.7 environment - hopefully nothing to do here, and we can just close this once we get a clean 5.7 run on DrupalCI.
Comment #9
joelpittetIt's a meta it doesn't need to be postponed, just needs it's children finished up.
Comment #13
pwolanin CreditAttribution: pwolanin as a volunteer and at SciShield commentedIt seems on MysSQL 5.7 it's possible to create a view that fatals on SQL when you add a group by and an order by and the field used for ordering is not in the grouping.
Example error:
Note we are using the patch from #2662548: Support Plugins for Views Aggregate to make it a little easer to do grouping
possible pgsql driver already has some code to try to handle this - mradcliff points me to:
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Database!Driver!p...
Comment #16
MixologicI added the mysql 5.7 environment as an option to test with to drupalci today. Seems to be failing a couple of tests:
https://www.drupal.org/pift-ci-job/1011706
I would really really love it if we could get this passing, and use it for the default mysql environment from now on. 5.7 is pretty common, and also, there is a bug in mysql that impacts one of the kernel tests that makes it take 5 min on 5.5, vs .2 sec on 5.7.
The 5.7 +php 7.1 tests seem to run in about 38 minutes, which is another 11 minutes of time saved off of our test runs if we could get there.
Comment #17
tacituseu CreditAttribution: tacituseu commentedComment #18
pounardMySQL 8 testing would also be a nice to have. In a few projects, we had SQL queries exploding after testing them on MySQL 8.
Comment #20
andypostGuess it should be about mysql8-kinds
Comment #21
catchWe have a MySQL 8 testing environment already, does this need to be open still?
Comment #23
joseph.olstadGot hit with this issue today
MySQL 5.7.30
Steps to reproduce, very easy:
Drupal 8.8.8
vanilla install
add a bunch of exposed filters to /admin/content view
click advanced options in /admin/content view
select query settings, enable 'distinct' checkmark
error message:
WORKAROUND:
install MySQL or MariaDB 5.6 and use 5.6 instead
OR add configuration as described above in previous comments.
Comment #24
joseph.olstadlikely need to expand test coverage to handle 'distinct' query option for the /admin/content view.
Comment #26
weseze CreditAttribution: weseze as a volunteer commentedI can confirm what @joseph.olstad has documented. I noticed the same sort of issue after a MySQL update from 5.6.x to 5.7.x, 100 D8 sites broken...
Seems to me that both Drupal 8 and 9 (the most recent releases) are not compatible with MySQL 5.7.
Comment #27
joseph.olstadIronically I also ran into a similar issue with Postgres 11 when using the 'distinct' query option after upgrading to Drupal 9.0.12 from Drupal 8.9.x
disabling the 'distinct' query option fixed it for Postgres 11 . With that said, ya MySQL 5.7 seems like an odd ball implementation of MySQL. I haven't noticed this issue with MariaDB.
there's a workaround for MySQL 5.7 which is to modify the settings.php with some strange options but I would recommend against it and recommend using MySQL 8 or MariaDB instead of this version of MySQL.
Comment #32
quietone CreditAttribution: quietone at PreviousNext commentedChanging tag
Comment #34
quietone CreditAttribution: quietone at PreviousNext commentedWe do have the testing environments asked for in the Issue Summary. I think it is time to close this.
Comment #37
joseph.olstadThere's a somewhat related patch available that could inspire fixes for
ERROR 3065 (HY000): Expression #1 of ORDER BY clause
#3221622: Unable to sort by current moderation state. Column not found
If the query uses DISTINCT we need to add column to the query.
See patch for ideas.
https://www.drupal.org/files/issues/2022-04-06/content_moderation-fix-Mo...