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

Database tables with primary column having signed instead of unsigned definition which is loss of usable values #38585

Open
5 tasks
kanevbg opened this issue Apr 6, 2024 · 14 comments · May be fixed by #38920
Open
5 tasks
Assignees
Labels
Area: Account Component: DB Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P3 May be fixed according to the position in the backlog. Progress: PR in progress Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@kanevbg
Copy link

kanevbg commented Apr 6, 2024

Preconditions and environment

  • Magento develop branch

Steps to reproduce

There is nothing to reproduce, it's a theoretical, architectural problem.

Expected result

Not applicable.

Actual result

Not applicable.

Additional information

Table catalog_product_entity_text has value_id primary column defined as signed int. However the system never stores zero or negative ID in that table.
image.

This means we have 50% usable values of what the underlining database storage may store in practice for the data produced by the application. I have not found a single reason for that column being signed instead of unsigned. Please checkout.

This is applicable to the following tables:

  • catalog_product_entity_datetime
  • catalog_product_entity_decimal
  • catalog_product_entity_int
  • catalog_product_entity_text
  • catalog_product_entity_varchar
  • catalog_product_entity_gallery
  • catalog_category_entity_decimal
  • catalog_category_entity_int
  • catalog_category_entity_text
  • catalog_category_entity_varchar
  • catalog_product_entity_tier_price
  • customer_address_entity_decimal
  • customer_address_entity_int
  • customer_address_entity_text
  • customer_address_entity_varchar
  • customer_entity_datetime
  • customer_entity_decimal
  • customer_entity_int
  • customer_entity_text
  • customer_entity_varchar
  • eav_entity_datetime
  • eav_entity_decimal
  • eav_entity_int
  • eav_entity_text
  • eav_entity_varchar
  • weee_tax

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Copy link

m2-assistant bot commented Apr 6, 2024

Hi @kanevbg. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@kanevbg kanevbg changed the title catalog_product_entity_X tables with primary value_id column is signed instead of unsigned which is loss of usable values catalog_product_entity_X tables with primary column having signed instead of unsigned definition which is loss of usable values Apr 6, 2024
@kanevbg kanevbg changed the title catalog_product_entity_X tables with primary column having signed instead of unsigned definition which is loss of usable values Database tables with primary column having signed instead of unsigned definition which is loss of usable values Apr 6, 2024
@faizanps
Copy link

faizanps commented Apr 6, 2024

@magento give me 2.4-develop instance

Copy link

Hi @faizanps. Thank you for your request. I'm working on Magento instance for you.

Copy link

@kanevbg
Copy link
Author

kanevbg commented Apr 6, 2024

@Bashev адаш така е нали 😄

@faizanps
Copy link

faizanps commented Apr 7, 2024

@magento give me 2.4-develop instance

Copy link

Hi @faizanps. Thank you for your request. I'm working on Magento instance for you.

Copy link

@engcom-Dash engcom-Dash self-assigned this Apr 7, 2024
Copy link

m2-assistant bot commented Apr 7, 2024

Hi @engcom-Dash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

    1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    1. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
    1. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

@engcom-Hotel engcom-Hotel added the Reported on 2.4.x Indicates original Magento version for the Issue report. label Apr 10, 2024
@engcom-Dash
Copy link
Contributor

engcom-Dash commented Apr 10, 2024

Hi @kanevbg

Thanks for reporting and collaboration.

Verified the issue in magento 2.4 dev instance. The issue is reproducable.

Database tables with primary column having signed instead of unsigned definition. Hence, confirming the issue.

Please refer the attached screenshots.

Screenshot 2024-04-10 at 7 09 02 PM

@engcom-Dash engcom-Dash added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Component: DB Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Area: Account labels Apr 10, 2024
@engcom-Dash engcom-Dash added Priority: P3 May be fixed according to the position in the backlog. Issue: ready for confirmation labels Apr 10, 2024
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-11758 is successfully created for this GitHub issue.

Copy link

m2-assistant bot commented Apr 10, 2024

✅ Confirmed by @engcom-Dash. Thank you for verifying the issue.
Issue Available: @engcom-Dash, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@kanevbg
Copy link
Author

kanevbg commented Apr 13, 2024

@engcom-Dash Please let me know if additional assistance or information may be helpful from my side.

@KrasnoshchokBohdan
Copy link
Contributor

@magento I am working on this

KrasnoshchokBohdan pushed a commit to KrasnoshchokBohdan/magento2 that referenced this issue Jul 12, 2024
…ead of unsigned definition which is loss of usable values

- changed unsigned attribute for value_id column for tables from original list + catalog_category_entity_datetime customer_address_entity_datetime
@KrasnoshchokBohdan KrasnoshchokBohdan linked a pull request Jul 12, 2024 that will close this issue
5 tasks
@engcom-Hotel engcom-Hotel moved this to Pull Request In Progress in Low Priority Backlog Aug 19, 2024
KrasnoshchokBohdan pushed a commit to KrasnoshchokBohdan/magento2 that referenced this issue Sep 14, 2024
…ead of unsigned definition which is loss of usable values

- changed unsigned attribute for primary columns
KrasnoshchokBohdan pushed a commit to KrasnoshchokBohdan/magento2 that referenced this issue Sep 17, 2024
…ead of unsigned definition which is loss of usable values

- rollback of unsigned attribute for main columns in app/code/Magento/Tax/etc/db_schema.xml due to test errors
KrasnoshchokBohdan pushed a commit to KrasnoshchokBohdan/magento2 that referenced this issue Sep 17, 2024
…ead of unsigned definition which is loss of usable values

- rollback of unsigned attribute for main columns in app/code/Magento/Cms/etc/db_schema.xml due to test errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Account Component: DB Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P3 May be fixed according to the position in the backlog. Progress: PR in progress Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants