[PaaS only]{class="badge informative" title="Applies to Adobe Commerce on Cloud projects (Adobe-managed PaaS infrastructure) and on-premises projects only."}

ACSD-65540: SQL error occurs due to missing REGEXP_LIKE function in company_structure updates

The ACSD-65540 patch fixes the issue where SQL error occurs due to missing REGEXP_LIKE function in company_structure updates. This patch is available when the Quality Patches Tool (QPT) 1.1.64 is installed. The patch ID is ACSD-65540.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce B2B (all deployment methods) 1.5.2

Compatible with Adobe Commerce versions:

  • Adobe Commerce B2B (all deployment methods) 1.5.2
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

SQL syntax error occurs due to missing REGEXP_LIKE function in company_structure updates.

Steps to reproduce:

  1. Update B2B to version 1.5.2.
  2. Run the following command:
bin/magento setup:upgrade

Expected results:

Upgrade completes succesfully.

Actual results:

Unable to apply data patch Magento\Company\Setup\Patch\Data\SetCompanyForStructure for module Magento_Company. Original exception message: SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION REGEXP_LIKE does not exist, query was: UPDATE `company_structure` SET `company_id` = ? WHERE (REGEXP_LIKE(path, '^331(/.+)?$'))

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3