Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests for MySQL 8.4 #2281

Merged
merged 1 commit into from
May 24, 2024
Merged

Fix tests for MySQL 8.4 #2281

merged 1 commit into from
May 24, 2024

Conversation

ajibarra
Copy link
Member

@ajibarra ajibarra commented May 24, 2024

Fixes #2277

The issue is caused by a new behavior in Mysql 8.4 that throws an error when you create a FK in table A to table B if Table B does not have a unique constraint.

SQLSTATE[HY000]: General error: 6125 Failed to add the foreign key constraint. Missing unique key for constraint 'FOREIGN_KEY' in the referenced table 'TABLE' 

There is a workaround setting variable RESTRICT_FK_ON_NON_STANDARD_KEY to OFF (ON by default) but in the case of the unit tests it would be enough to create keys as unique.

The report: https://bugs.mysql.com/bug.php?id=114838

@MasterOdin please let me know your thoughts

@MasterOdin MasterOdin changed the title 2277 - Fix tests for MySQL 8.4 and upgrade ci workflow Fix tests for MySQL 8.4 May 24, 2024
@MasterOdin MasterOdin merged commit 12340e9 into cakephp:0.x May 24, 2024
14 checks passed
@MasterOdin
Copy link
Member

Thanks for figuring this out, and happy that it was just a test change that was required!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix test suite to run against mysql 8.4
3 participants