-
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
executor, privileges: fix privilege check fail for CREATE USER
and DROP USER
#11589
Conversation
LGTM |
Codecov Report
@@ Coverage Diff @@
## master #11589 +/- ##
===========================================
Coverage 81.7735% 81.7735%
===========================================
Files 435 435
Lines 94604 94604
===========================================
Hits 77361 77361
Misses 11798 11798
Partials 5445 5445 |
PTAL @lysu |
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 |
/run-all-tests |
cherry pick to release-3.0 failed |
cherry pick to release-2.1 failed |
It seems that, not for sure, we failed to cherry-pick this commit to release-2.1 release-3.0. Please comment '/run-cherry-picker' to try to trigger the cherry-picker if we did fail to cherry-pick this commit before. @imtbkcat PTAL. |
/run-cherry-picker |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-2.1 in PR #16158 |
What problem does this PR solve?
fix #9111
What is changed and how it works?
This problem was caused by using
ctx.Execute(sql)
to modify system privilege table. If user do not have privilege to insert or date tomysql.User
, SQL execution will fail user hadCREATE USER
privilege.Using system session to execute sql to modify
mysql.User
will fix this problem.Check List
Tests
Code changes
Side effects
Related changes