MariaDB 10.11.17 Compatibility Alert: Critical Quote Recollection Bug in Magento 2.4.7-p10

Urgent Warning for Magento 2.4.7-p10 Users: MariaDB 10.11.17 Causes Critical Quote Recollection Failures

As e-commerce migration experts at Shopping Mover, we constantly monitor the Magento ecosystem for critical issues that could impact our clients and the broader community. A recent GitHub issue (#40826) has brought to light a severe compatibility problem between Magento Open Source/Adobe Commerce 2.4.7-p10 and MariaDB 10.11.17. This bug can lead to "Lost connection to MySQL server during query" errors, specifically affecting the crucial quote recollection process.

The Core Issue: A Database-Specific Query Failure

The problem manifests when Magento attempts to execute a specific SQL query within the \Magento\Quote\Model\ResourceModel\Quote::markQuotesRecollect method. This query, designed to update quote data, fails catastrophically when running on MariaDB 10.11.17, while it reportedly works without issues on the preceding version, MariaDB 10.11.16. The error message "Lost connection to MySQL server during query" indicates a fundamental breakdown in database communication or query processing.

The problematic query is as follows:

UPDATE `quote` AS `t1`
  INNER JOIN (SELECT `quote_item`.`quote_id` AS `entity_id`
              FROM `quote_item`
              WHERE (product_id IN ( '24442' ))
              GROUP BY `quote_id`) AS `t2`
    ON t1.entity_id = t2.entity_id
 SET `t1`.`trigger_recollect` = 1,
     `t1`.`updated_at` = `t1`.`updated_at`

This query is vital for ensuring that customer quotes (shopping carts) are properly updated, especially when product information changes. A failure here can lead to stale cart data, incorrect pricing, or even prevent customers from completing their purchases, severely impacting the user experience and sales.

Impact on Merchants and Developers

For merchants running or planning to upgrade to Magento 2.4.7-p10, this issue presents a significant risk. An upgrade to MariaDB 10.11.17 could inadvertently break core e-commerce functionality, leading to:

  • Broken Shopping Carts: Customers might experience issues with cart contents not updating correctly.
  • Checkout Failures: The inability to recollect quotes could prevent successful order placement.
  • Data Integrity Concerns: Inconsistent quote data can lead to further complications down the line.

For developers and system administrators, this highlights the critical importance of thorough testing, especially when performing database upgrades. While the specific cause of the MariaDB 10.11.17 regression is yet to be fully understood within the Magento community (as no immediate solutions or detailed discussions were present in the initial issue report), it underscores the delicate balance of environment compatibility.

What We Know (and Don't Know Yet)

As of the initial report, this appears to be a newly identified, critical bug. The GitHub issue was created recently and, based on the provided information, does not yet contain community-contributed workarounds or official Magento fixes. This means users encountering the issue may not have an immediate, straightforward solution.

Recommendations from Shopping Mover

Until an official fix or a clear workaround is provided, we strongly advise the following:

  • Avoid MariaDB 10.11.17: If you are running Magento 2.4.7-p10, or planning an upgrade, refrain from upgrading your MariaDB instance to version 10.11.17. Stick to 10.11.16 or earlier stable, compatible versions.
  • Thorough Testing: Always perform comprehensive regression testing in a staging environment before deploying any database or Magento version upgrades to production. This includes testing all core functionalities, especially cart and checkout processes.
  • Monitor the GitHub Issue: Keep a close eye on Magento GitHub Issue #40826 for updates, potential workarounds, or official patches.
  • Consider Alternatives: If you've already upgraded and are facing this issue, consider rolling back your MariaDB version as a temporary measure, or explore if a custom module overriding the problematic resource model method could provide a temporary fix (though this requires careful development and testing).

This situation reinforces Shopping Mover's commitment to meticulous pre-migration audits and post-migration testing. Database compatibility is a cornerstone of a stable e-commerce platform, and overlooking such details can lead to significant operational disruptions. Stay vigilant, and prioritize stability over immediate upgrades when critical compatibility issues emerge.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools