Skip to content

fix: lowercase information_schema columns data types - #26712

Merged
mergify[bot] merged 2 commits into
matrixorigin:mainfrom
iamlinjunhong:m-26680
Aug 6, 2026
Merged

mergify[bot] merged 2 commits into
matrixorigin:mainfrom
iamlinjunhong:m-26680

Conversation

@iamlinjunhong

Copy link
Copy Markdown
Contributor

Return MySQL-compatible lowercase DATA_TYPE values and refresh the COLUMNS view for existing tenants.

Fixes #26680

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #26680

What this PR does / why we need it:

fix: lowercase information_schema columns data types

@iamlinjunhong
iamlinjunhong requested a review from a user August 5, 2026 03:19
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@matrix-meow matrix-meow added the size/L Denotes a PR that changes [500,999] lines label Aug 5, 2026

@LeftHandCold LeftHandCold left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tenant-upgrade wiring is idempotent and the VersionOffset bump correctly reaches already-upgraded 4.0.6 tenants, but the DATA_TYPE compatibility fix is incomplete: lowercasing alone still leaves issue-reachable types outside Connector/ODBC 9.7.0's exact mapping table. In particular, the issue's c_bool remains SQL_UNKNOWN_TYPE, and unsigned integer columns remain unknown as well. Please normalize DATA_TYPE to MySQL-compatible base type names and cover those cases before merging.

Comment thread pkg/util/sysview/predefined.go Resolved

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Lowercasing DATA_TYPE is insufficient to fix the Connector/ODBC compatibility issue. mo_show_visible_bin(..., 2) emits BOOL and unsigned names such as INT UNSIGNED, so this change returns bool and int unsigned. Connector/ODBC 9.7.0 performs an exact lookup and has neither key, which means the issue-reported c_bool and unsigned integer columns still become SQL_UNKNOWN_TYPE. Please normalize DATA_TYPE to MySQL base names (BOOL to tinyint; unsigned integer types to tinyint/smallint/int/bigint), retain signedness and width in COLUMN_TYPE, and add bool plus unsigned coverage.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep review on head 713aae6: the prior BOOL/unsigned normalization and same-version offset-upgrade blockers are fixed. Verified fresh-vs-existing tenant upgrade closure, DATA_TYPE/COLUMN_TYPE compatibility boundaries, targeted bootstrap/v4_0_6/sysview tests, and green CI. LGTM.

@LeftHandCold LeftHandCold left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed current head 713aae6 against merge-base c31b46d.

The previously requested blockers are closed:

  • DATA_TYPE now uses Connector/ODBC-compatible MySQL base names: lowercase values, BOOL -> tinyint, and unsigned integer DATA_TYPE values stripped to their base type while COLUMN_TYPE retains signedness/width;
  • equal-version offset upgrades now execute for tenants already at 4.0.6, while ordinary version-transition skips and newer-tenant guards remain unchanged.

I independently checked fresh-install vs existing-tenant behavior, upgrade task accounting, retry/transaction rollback, the no-op create_version UPDATE affected-row contract, the full type-expression branches, and the updated regression expectations. The standard UPDATE path counts the matched main-table row, so writing the same create_version still satisfies UpgradeTenantVersion's AffectedRows == 1 invariant.

No further blocking production issue found. git diff --check is clean, and all executed CI checks are green (the remaining entries are explicitly skipped/neutral by workflow). I did not run an additional broad local BVT/UT suite.

@mergify mergify Bot added the queued label Aug 6, 2026
@mergify

mergify Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-08-06 07:40 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • ✅ Checks passed · in-place
  • ✅ Merged — 2026-08-06 09:15 UTC · at 1ef1415cc0644b148d238f07ee38b7b51201ffca · squash

This pull request spent 1 hour 35 minutes 14 seconds in the queue, including 50 minutes 47 seconds running CI.

Required conditions to merge
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • github-review-approved [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / SCA Test on Linux/arm64
    • check-neutral = Matrixone CI / SCA Test on Linux/arm64
    • check-skipped = Matrixone CI / SCA Test on Linux/arm64
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Utils CI / Coverage
    • check-neutral = Matrixone Utils CI / Coverage
    • check-skipped = Matrixone Utils CI / Coverage
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-neutral = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-skipped = Matrixone UT Coverage / UT Coverage on Ubuntu/x86

@mergify
mergify Bot merged commit d129a85 into matrixorigin:main Aug 6, 2026
26 of 27 checks passed
@mergify mergify Bot removed the queued label Aug 6, 2026
@iamlinjunhong
iamlinjunhong deleted the m-26680 branch August 23, 2026 17:13
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
)

fix: lowercase information_schema columns data types

Approved by: @LeftHandCold, @XuPeng-SH, @heni02
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
)

fix: lowercase information_schema columns data types

Approved by: @LeftHandCold, @XuPeng-SH, @heni02
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
)

fix: lowercase information_schema columns data types

Approved by: @LeftHandCold, @XuPeng-SH, @heni02

This branch was previously deployed

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

Labels

size/L Denotes a PR that changes [500,999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: information_schema.columns.DATA_TYPE uppercase values break ODBC SQLColumns type mapping

4 participants