-
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
planner: forbiden nested view creation #15420
Conversation
/rebuild |
Codecov Report
@@ Coverage Diff @@
## master #15420 +/- ##
================================================
+ Coverage 80.3417% 80.8531% +0.5114%
================================================
Files 502 502
Lines 133557 135735 +2178
================================================
+ Hits 107302 109746 +2444
+ Misses 17810 17614 -196
+ Partials 8445 8375 -70 |
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.
We'd better add a stack depth check when performing select * from view
to avoiding further stack overflow.
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
Your auto merge job has been accepted, waiting for 15415 |
/run-all-tests |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-3.0 in PR #15424 |
What problem does this PR solve?
Problem Summary:
Before this commit, nested view creation is allowed in TiDB, while select on this view brings panic. Actually, nested view creation is forbidden in MySQL.
What is changed and how it works?
What's Changed:
Check the underlying views of when creating a view. And make the error message be compatible with MySQL.
How it Works:
Forbid creating view nested.
Related changes
release-3.0, release-3.1, release-4.0
Check List
Tests
Side effects
N/A
Release note