infoschema: remove foreign key table from tableInfoResident (#59879)
This is an automated cherry-pick of #59879
What problem does this PR solve?
Issue Number: close https://github.com/pingcap/tidb/issues/61191
Problem Summary:
foreign key store in referredForeignKeys, not necessary store in tableInfoResident anymore.
What changed and how does it work?
remove foreign key from special attribute.
Check List
Tests
- [x] Unit test
- [ ] Integration test
- [x] Manual test (add detailed scripts or steps below)
create tables(1/3 contain foreign key) before PR, QPS drop after create 3.42 Million tables
create tables(1/3 contain foreign key) after PR, QPS drop slower then before after create 8.89 Million tables
- [ ] 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
Please refer to Release Notes Language Style Guide to write a quality release note.
None
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:warning: Please upload report for BASE (release-8.5@e4e814f). Learn more about missing BASE report.
Additional details and impacted files
@@ Coverage Diff @@
## release-8.5 #64676 +/- ##
================================================
Coverage ? 78.6819%
================================================
Files ? 1694
Lines ? 499089
Branches ? 0
================================================
Hits ? 392693
Misses ? 84464
Partials ? 21932
| Flag | Coverage Δ | |
|---|---|---|
| integration | 54.4987% <100.0000%> (?) |
|
| unit | 73.1505% <100.0000%> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Components | Coverage Δ | |
|---|---|---|
| dumpling | 52.9278% <0.0000%> (?) |
|
| parser | ∅ <0.0000%> (?) |
|
| br | 70.7532% <0.0000%> (?) |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Benjamin2037, GMHDBJD
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~pkg/infoschema/OWNERS~~ [Benjamin2037,GMHDBJD]
- ~~pkg/meta/OWNERS~~ [Benjamin2037,GMHDBJD]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
[LGTM Timeline notifier]
Timeline:
2025-11-26 04:49:52.065942289 +0000 UTC m=+678355.715136736: :ballot_box_with_check: agreed by Benjamin2037.2025-12-11 08:15:35.493713589 +0000 UTC m=+1115280.307491161: :ballot_box_with_check: agreed by GMHDBJD.
/retest
/retest
/test unit-test
@EmmaDuDu: No presubmit jobs available for pingcap/[email protected]
In response to this:
/test unit-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.
/ok-to-test
/retest
/retest
/unhold
/retest
/retest
/retest
@ti-chi-bot: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| fast_test_tiprow | 1729924232ff0fce28f559afa737dc6187d0125d | link | true | /test fast_test_tiprow_for_release |
| fast_test_tiprow_for_release | 1729924232ff0fce28f559afa737dc6187d0125d | link | true | /test fast_test_tiprow_for_release |
Full PR test history. Your PR dashboard.
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. I understand the commands that are listed here.