-
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: Fix the 'Unknown column' error when select from view in another database #15621
Conversation
Hi @longfangsong, thanks for your contribution, please add a UT for this bugfix. |
Codecov Report
@@ Coverage Diff @@
## master #15621 +/- ##
===============================================
- Coverage 80.551% 80.4156% -0.1354%
===============================================
Files 504 503 -1
Lines 135349 134475 -874
===============================================
- Hits 109025 108139 -886
+ Misses 17860 17837 -23
- Partials 8464 8499 +35 |
I'm sorry that I'm new in tidb developing, so I'm not sure whether I put the test in the right place. If I'm wrong, could you please tell me where should I put it in. |
@@ -2927,7 +2927,7 @@ func (b *PlanBuilder) buildProjUponView(ctx context.Context, dbName model.CIStr, | |||
OrigTblName: name.OrigTblName, | |||
ColName: columnInfo[i].Name, | |||
OrigColName: origColName, | |||
DBName: name.DBName, | |||
DBName: dbName, |
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.
@XuHuaiyu Do you have any advise about how to test this bugfix?
Don't worry, we'll help you. 😄 |
@longfangsong |
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
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
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
/run-all-tests |
@longfangsong merge failed. |
/run-sqllogic-test |
/merge |
Your auto merge job has been accepted, waiting for 15836, 15856, 15817, 15851, 15849, 15709 |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-3.0 in PR #15866 |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-3.1 in PR #15867 |
cherry pick to release-4.0 in PR #15868 |
What problem does this PR solve?
fix #15611
Issue Number: close #15611
What is changed and how it works?
What's Changed:
Changing this line to
DBName: dbName
Just as @XuHuaiyu mentioned.
Related changes
NA
Release note
NA
Unit test is already added.