-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
planner/core: fix index out of bound bug when empty dual table is remove for mpp query #28251
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
After you have format title, you can leave a comment |
/label needs-cherry-pick-5.1 |
/label needs-cherry-pick-5.0 |
/label needs-cherry-pick-5.2 |
case *LogicalUnionAll, *PhysicalUnionAll, *LogicalPartitionUnionAll: | ||
// after https://github.com/pingcap/tidb/pull/25218, the union may contain less than 2 children, | ||
// but we still wants to include its child plan's information when calling `toString` on union. | ||
return true |
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.
would this case happen in other cases?
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.
You mean will the union may contain less than 2 children
cause other bugs? I'm not sure about this, and if it does happen, we will fix it in other prs.
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.
oncall 3751 can't reproduce, but maybe it's caused by the same bug? @windtalker
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
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 4ce4cdd
|
Reducing the dual table child of union may introduce other unknown issues, we should remove union if its children are less than 2. |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-5.0 in PR #28278 |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-5.1 in PR #28279 |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-5.2 in PR #28280 |
* ddl, executor: fix test race in terror (#25405) (#28198) * cherry pick #28251 to release-5.0 Signed-off-by: ti-srebot <[email protected]>
What problem does this PR solve?
Issue Number: close #28250
Problem Summary:
As described in the issue.
What is changed and how it works?
Proposal: xxx
What's Changed:
How it Works:
The root cause is after #25218, union may contain less than 2 children, but in
stringer.ToString
, it still assume thatunion
always contains at least 2 children. This pr refine the related code to consider the case thatunion
contains less than 2 children.Check List
Tests
Side effects
Documentation
Release note