ACSD-48216: AUTO_INCREMENT of inventory_source_item table increases on UPDATE operation
The ACSD-48216 patch fixes the issue where AUTO_INCREMENT of the inventory_source_item table increases on the UPDATE operation. This patch is available when the Quality Patches Tool (QPT) 1.1.27 is installed. The patch ID is ACSD-48216. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.7.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.4
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.3.7 - 2.4.6
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
AUTO_INCREMENT
of the inventory_source_item
table increases on the UPDATE
operation.
Steps to reproduce:
- Check the current value of
AUTO_INCREMENT
of theinventory_source_item
table:
MySQL > show create table inventory_source_item;
CREATE TABLE `inventory_source_item` (
`source_item_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`source_code` varchar(255) NOT NULL,
`sku` varchar(64) NOT NULL,
`quantity` decimal(12,4) NOT NULL DEFAULT '0.0000',
`status` smallint(5) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`source_item_id`),
UNIQUE KEY `INVENTORY_SOURCE_ITEM_SOURCE_CODE_SKU` (`source_code`,`sku`),
KEY `INVENTORY_SOURCE_ITEM_SKU_SOURCE_CODE_QUANTITY` (`sku`,`source_code`,`quantity`),
CONSTRAINT `INVENTORY_SOURCE_ITEM_SOURCE_CODE_INVENTORY_SOURCE_SOURCE_CODE` FOREIGN KEY (`source_code`) REFERENCES `inventory_source` (`source_code`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2048 DEFAULT CHARSET=utf8
- Make an API request for a specific product:
Endpoint: /rest/V1/inventory/source-items
Method: POST
Headers: Authorization: Bearer <admin_token>
Payload:
{
"sourceItems": [
{
"sku": "24-MB01",
"source_code": "default",
"quantity": 200,
"status": 1
}
]
}
- Check the
AUTO_INCREMENT
value of theinventory_source_item
table again.
Expected results:
The AUTO_INCREMENT
value of the inventory_source_item
table does not increase after every update operation.
Actual results:
The AUTO_INCREMENT
value of the inventory_source_item
table increases after every update operation.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide
Related reading
- Quality Patches Tool released: a new tool to self-serve quality patches in the support knowledge base
- Check if patch is available for your Adobe Commerce issue using Quality Patches Tool in the Quality Patches Tool guide
- Best practices for modifying database tables in the Commerce Implementation Playbook
For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.