-
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
privilege: add drop_priv check when truncate table #9870
Conversation
@tiancaiamao PTAL |
@xiekeyi98 PTAL |
Codecov Report
@@ Coverage Diff @@
## master #9870 +/- ##
================================================
+ Coverage 67.3504% 67.3541% +0.0037%
================================================
Files 383 383
Lines 80436 80436
================================================
+ Hits 54174 54177 +3
- Misses 21416 21417 +1
+ Partials 4846 4842 -4 |
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.
@xiekeyi98 Done. |
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
LGTM |
/run-all-tests |
/run-all-tests |
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
What problem does this PR solve?
Before this PR, TiDB user truncate table only needs delete_priv. After this PR, needs drop_priv. To be consistent with MySQL. https://dev.mysql.com/doc/refman/5.7/en/privileges-provided.html#priv_drop
What is changed and how it works?
Add drop_priv to the visitInfo in the plan builder.
Check List
Tests
Code changes
Side effects
Related changes