-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
statistics, planner: use the correct IndexInfo
in GenerateHistCollFromColumnInfo()
| tidb-test=pr/2211 (#44441)
#46728
statistics, planner: use the correct IndexInfo
in GenerateHistCollFromColumnInfo()
| tidb-test=pr/2211 (#44441)
#46728
Conversation
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
/retest |
1 similar comment
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/retest |
IndexInfo
in GenerateHistCollFromColumnInfo()
| tidb-test=pr/2149 (#44441)IndexInfo
in GenerateHistCollFromColumnInfo()
| tidb-test=pr/2211 (#44441)
/retest |
2 similar comments
/retest |
/retest |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## release-6.5 #46728 +/- ##
================================================
Coverage ? 73.7748%
================================================
Files ? 1085
Lines ? 349969
Branches ? 0
================================================
Hits ? 258189
Misses ? 75297
Partials ? 16483 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hawkingrei, YangKeao 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 |
[LGTM Timeline notifier]Timeline:
|
/retest |
This is an automated cherry-pick of #44441
What problem does this PR solve?
Issue Number: close #44369
Problem Summary:
We saved the
IndexInfo
in the stats cache, and use it in the query.But it may be outdated after DDL, which will cause some strange and unexpected result.
In this bug, we generated an incomplete
HistColl.Idx2ColumnIDs
.The following estimation logic panicked when trying to get the needed column that was missing in it.
What is changed and how it works?
Use the
IndexInfo
from theDataSource.tableInfo.Indices
inGenerateHistCollFromColumnInfo
.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.