-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Magento's setup:db:status
fails with MySQL 8.0.29
#35671
Comments
Hi @lbajsarowicz. Thank you for your report.
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
For more details, review the Magento Contributor Assistant documentation. Add a comment to assign the issue: To learn more about issue processing workflow, refer to the Code Contributions.
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket. ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Hi @engcom-November. Thank you for working on this issue.
|
Hi @lbajsarowicz , |
Fix for setup:db:status in 2.4.4 based on magento/magento2#35671
✅ Jira issue https://jira.corp.magento.com/browse/AC-5970 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-November. Thank you for verifying the issue. |
Having the same issue, |
I'm having the same issue. The schema is always not up to date. The |
As a workaround, I'm using the following patch with the --- a/Setup/Declaration/Schema/Dto/Factories/Table.php
+++ b/Setup/Declaration/Schema/Dto/Factories/Table.php
@@ -23,12 +23,12 @@
/**
* Default charset for SQL
*/
- public const DEFAULT_CHARSET = 'utf8';
+ public const DEFAULT_CHARSET = 'utf8mb3';
/**
* Default collation
*/
- public const DEFAULT_COLLATION = 'utf8_general_ci';
+ public const DEFAULT_COLLATION = 'utf8mb3_general_ci';
/**
* @var ObjectManagerInterface It solves the problem with changes caused by encodings. I had other issues as well (#36558), so this workaround patch is not guaranteed to fix all issues. |
I think this means we need to update the charset in the database to utf8, since that's a reference at the moment for utf8mb3 and will be updated to a reference to utf8mb4. see: same for utf8mb3_general_ci that needs to be updated to utf8_general_ci. Or am i wrong? |
Closed without an explanation telling why? Possibly fixed by AC-7469: Add support for MySQL8.0.29 and higher ? |
@hostep; I guess some habits are hard to kick. 😉 |
Hello, As I can see this issue got fixed in the scope of the internal Jira ticket AC-5970 by the internal team Based on the Jira ticket, the target version is 2.4.6. Thanks |
Hi all,
|
@jonathanribas No disagreement - but Magento currently uses utf8mb3 and this issue is about fixing it not recognizing it. A new issue should be created to move off the deprecated charset |
There is already one for |
Preconditions and environment
Steps to reproduce
setup:upgrade
setup:db:status
Expected result
Magento should report that the Database is up-to-date
Actual result
bin/magento setup:db:status
bin/magento setup:upgrade
bin/magento setup:db:status
bin/magento setup:db-schema:upgrade
bin/magento setup:db:status
Additional information
Issue is caused by charset comparison.
The default table charset is defined in
![image](https://user-images.githubusercontent.com/1639941/175430609-93bd18cc-9ec7-4bc6-b798-7b37af1b1387.png)
\Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Table::create
Our internal workaround is a plugin which overrides default MySQL charset if no other provided:
Another possible solution is to override
\Magento\Framework\Setup\Declaration\Schema\Dto\Table::getDiffSensitiveParams
parameters, excludingcharset
from the list. (Composer patch below)Huge thanks for helping with the investigation to @LeeSaferite, @navarr, and @so-max-u
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: