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, infoschema: filter out the PRIMARY index and foreign keys in table_constraints #55255

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

YangKeao
Copy link
Member

@YangKeao YangKeao commented Aug 7, 2024

What problem does this PR solve?

Issue Number: close #55253
Problem Summary:

The previous patch https://github.com/pingcap/tidb/pull/55236/files#diff-cd85979e0fe90c288bf582cb1b181f51cbb7b874423cc4e1163617e2dbf95c98R2140-R2142 forgot to filter the PRIMARY index and the foreign keys. This PR fixes this issue.

What changed and how does it work?

Add two filters condition on PRIMARY index and foreign keys.

It'd be better to have a function to automatically check all records according to the extracted column and defined columns in the table, and replace all manual append(rows, record). However, @tangenta told me he's working on rewriting the extractor and making every table has its own retriever, so I only submit some temporary fixes.

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.

Release note

Fix the issue that the `PRIMARY` index cannot be filtered out from the `TABLE_CONSTRAINTS` table.

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed do-not-merge/needs-triage-completed labels Aug 7, 2024
@YangKeao
Copy link
Member Author

YangKeao commented Aug 7, 2024

/hold Wait a minute. I'm checking the tests.

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 7, 2024
Copy link

codecov bot commented Aug 7, 2024

Codecov Report

Attention: Patch coverage is 91.11111% with 4 lines in your changes missing coverage. Please review.

Project coverage is 74.8320%. Comparing base (3dfa15c) to head (fba6f4b).
Report is 45 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #55255        +/-   ##
================================================
+ Coverage   72.8486%   74.8320%   +1.9833%     
================================================
  Files          1570       1573         +3     
  Lines        439518     442229      +2711     
================================================
+ Hits         320183     330929     +10746     
+ Misses        99610      90973      -8637     
- Partials      19725      20327       +602     
Flag Coverage Δ
integration 49.1127% <80.0000%> (?)
unit 71.8212% <91.1111%> (-0.0666%) ⬇️

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

Components Coverage Δ
dumpling 52.9567% <ø> (ø)
parser ∅ <ø> (∅)
br 52.5521% <ø> (+6.6900%) ⬆️

@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 7, 2024
@YangKeao
Copy link
Member Author

YangKeao commented Aug 7, 2024

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 7, 2024
@YangKeao
Copy link
Member Author

YangKeao commented Aug 7, 2024

/test pull-integration-common-test

@YangKeao
Copy link
Member Author

YangKeao commented Aug 7, 2024

/test pull-integration-nodejs-test

Copy link

tiprow bot commented Aug 7, 2024

@YangKeao: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test pull-integration-common-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link

tiprow bot commented Aug 7, 2024

@YangKeao: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test pull-integration-nodejs-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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

ti-chi-bot bot commented Aug 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tangenta, tiancaiamao

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:
  • OWNERS [tangenta,tiancaiamao]

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 Aug 12, 2024
Copy link

ti-chi-bot bot commented Aug 12, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-07 13:01:50.075201822 +0000 UTC m=+443439.942300909: ☑️ agreed by tangenta.
  • 2024-08-12 06:01:09.16067554 +0000 UTC m=+161353.864145231: ☑️ agreed by tiancaiamao.

@ti-chi-bot ti-chi-bot bot merged commit 813fe19 into pingcap:master Aug 12, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. 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 PRIMARY index is not filtered out from the TABLE_CONSTRAINTS
3 participants