-
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
Fix incorrect table name during catalog product indexing #7256
Fix incorrect table name during catalog product indexing #7256
Conversation
The left join used an incorrect table name and it added way more rows for a single entity than it should and the entity id wasn't unique anymore, which failed the insert part of the SQL query.
@valdislav as you introduced the bug, this fix might be interesting for you. It would be good to get the fix into the core before the bug gets released in a new magento version and causes issues for everyone who are using flat tables. |
@nagno Yes, we will pick up fix as soon as possible. Big thanks for your contribution. Internal ticket: MAGETWO-60397 |
As for entity_id it could be primary in attribute tables in community edition, but it could be replaced by another auto incremented field and will not represent an unique row in table. It is not recommended to use custom row SQL queries to product attribute tables, please use API. If for some reasons you can not, For retrieving link field with product and related tables please use Metadata for product: $this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField() |
We came across with the issue when we were reindexing in EE, but in this case that not is the source of the issue.
So you are joining the
So your left join table and the table in the condition is not the same.
Which is resolved by the fix. Let me know if you have any further questions regarding the issue or the fix. We don't have any customisation around that area. |
Sync 2.4-develop changes with 2.4.4-beta
The left join used an incorrect table name and it added way more rows for a single entity than it should. The entity id wasn't unique anymore, which failed the insert part of the SQL query.
This bug is not released yet in any version, only exists in the develop branch. I really hope this time you will be faster than the usual and merge it in before you release the bug in a "stable" version.