-
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 a bug that check update privilege use wrong AsName
and DBName
#9003
Conversation
…` and DBName * Fix issue 8911 * Check privilege should use table OrigName, instead of AsName * Some col.DBName is not set, it should be CurrentDB name
Codecov Report
@@ Coverage Diff @@
## master #9003 +/- ##
==========================================
+ Coverage 67.55% 67.57% +0.01%
==========================================
Files 363 363
Lines 75338 75341 +3
==========================================
+ Hits 50895 50911 +16
+ Misses 19945 19939 -6
+ Partials 4498 4491 -7
Continue to review full report at Codecov.
|
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 |
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-unit-test |
…` and DBName (pingcap#9003) * Fix issue 8911 * Check privilege should use table OrigName, instead of AsName
What problem does this PR solve?
Fix issue #8911
What is changed and how it works?
The 'privilege check fail' comes from the wrong
visitInfo
which is collected fromupdate tb_wehub_server a set a.active_count=a.active_count+1,a.used_count=a.used_count+1 where id=1
The correct
visitInfo
should bebut we get
Check List
Tests
Side effects
I find privilege check for
OrigName
is not a completely solved problem, some places may still useAsName
.I'll later go over the code and take a full check.