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

executor: fix the issue that the int primary key doesn't show in the index usage #58257

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

YangKeao
Copy link
Member

What problem does this PR solve?

Issue Number: close #58256

Problem Summary:

What changed and how does it work?

If the table only has an integer primary key, add a fake index entry to the index usage extractor to get it.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. sig/planner SIG: Planner labels Dec 13, 2024
@YangKeao YangKeao added needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. and removed sig/planner SIG: Planner size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 13, 2024
@YangKeao YangKeao changed the title executor: fix the issue that the int primary key is not shown executor: fix the issue that the int primary key is not shown in the index usage Dec 13, 2024
@ti-chi-bot ti-chi-bot bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 13, 2024
@YangKeao YangKeao requested a review from qw4990 December 13, 2024 11:01
@ti-chi-bot ti-chi-bot bot added the sig/planner SIG: Planner label Dec 16, 2024
@YangKeao YangKeao requested a review from hawkingrei December 16, 2024 06:56
Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.7140%. Comparing base (d0ea9e5) to head (13909c1).
Report is 4 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #58257        +/-   ##
================================================
+ Coverage   73.5240%   73.7140%   +0.1899%     
================================================
  Files          1681       1681                
  Lines        463969     464948       +979     
================================================
+ Hits         341129     342732      +1603     
+ Misses       101997     101485       -512     
+ Partials      20843      20731       -112     
Flag Coverage Δ
integration 43.3979% <100.0000%> (?)
unit 72.4844% <94.1176%> (+0.1971%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 45.8013% <ø> (+0.0299%) ⬆️

@YangKeao
Copy link
Member Author

/retest

2 similar comments
@YangKeao
Copy link
Member Author

/retest

@YangKeao
Copy link
Member Author

/retest

@YangKeao YangKeao force-pushed the fix-58256 branch 2 times, most recently from af8ab94 to cf384b1 Compare December 17, 2024 05:11
@YangKeao YangKeao changed the title executor: fix the issue that the int primary key is not shown in the index usage executor: fix the issue that the int primary key doesn't show in the index usage Dec 17, 2024
@YangKeao YangKeao force-pushed the fix-58256 branch 3 times, most recently from b55a149 to 23f561d Compare December 17, 2024 07:03
@YangKeao
Copy link
Member Author

/retest

@YangKeao YangKeao force-pushed the fix-58256 branch 5 times, most recently from ecd6e36 to 1b8cb0e Compare December 17, 2024 12:59
@YangKeao YangKeao force-pushed the fix-58256 branch 6 times, most recently from f987e9b to dda1ad9 Compare December 18, 2024 13:18
@YangKeao
Copy link
Member Author

/retest

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 19, 2024
Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Dec 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bb7133, qw4990

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 20, 2024
Copy link

ti-chi-bot bot commented Dec 20, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-19 07:21:28.053377309 +0000 UTC m=+1114278.142179852: ☑️ agreed by qw4990.
  • 2024-12-20 08:32:56.860730886 +0000 UTC m=+1204966.949533426: ☑️ agreed by bb7133.

@bb7133
Copy link
Member

bb7133 commented Dec 20, 2024

/retest

@YangKeao
Copy link
Member Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit 52de47d into pingcap:master Dec 23, 2024
24 checks passed
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 23, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #58467.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The integer primary key is not included in the information_schema.tidb_index_usage
4 participants