Skip to content

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

Open
@kanevbg

Description

@kanevbg

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”.

Activity

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

Metadata

Metadata

Labels

Area: AccountComponent: DBIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.Progress: PR in progressReported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions