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

Integrity constraint violation: 1062 Duplicate entry #75

Closed
larsroettig opened this issue Sep 3, 2017 · 1 comment
Closed

Integrity constraint violation: 1062 Duplicate entry #75

larsroettig opened this issue Sep 3, 2017 · 1 comment
Assignees

Comments

@larsroettig
Copy link
Member

larsroettig commented Sep 3, 2017

Preconditions

  • Create two Sources
  • Assign SKU-1 quantity to Source 1 - 5 quantity and Status in Stock
  • Assign SKU-1 quantity to Source 2 - 5 quantity and Status out of Stock

Steps to reproduce

  • Try Save in the in fixtures or in the backend

Expected result

Can save without error

Actual result

savemultiple_php_-_magento2_-___volumes_webroot_www_magento2_

In the Backend can Status out of Stock not saved.

test___products___inventory___catalog___magento_admin

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'SKU-1' for key 'PRIMARY', query was: INSERT INTO inventory_stock_item_stock_32_replica (sku,quantity,status) VALUES (?, ?, ?), (?, ?, ?)
/Volumes/webroot/www/magento2/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php:555

With the following test case, it works fine!

Assign SKU-1 quantity to Source 1 - 5 quantity and Status in Stock
Assign SKU-1 quantity to Source 2 - 5 quantity and Status in Stock

@naydav
Copy link

naydav commented Oct 12, 2017

Fixed after index refactoring

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

No branches or pull requests

2 participants