Update privilege management guidelines for setting default roles#23020
Update privilege management guidelines for setting default roles#23020sgykfjsm wants to merge 3 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Code Review
This pull request updates the privilege documentation in privilege-management.md regarding setting default roles. However, the changes were mistakenly placed under the ### KILL heading, overwriting the documentation for killing user sessions. The reviewer pointed out this misplacement, provided a suggestion to restore the KILL documentation and move the default roles guidelines to the correct ### SET DEFAULT ROLE section, and noted that mysql.default_roles should be enclosed in backticks per the style guide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
First-time contributors' checklist
What is changed, added or deleted? (Required)
The previous documentation stated that
SET DEFAULT ROLErequiresSUPER, but TiDB checks different privileges in the current implementation (https://github.com/pingcap/tidb/blob/v8.5.6/pkg/executor/simple.go#L408-L432).This update documents the self-user case separately and clarifies that changing default roles for other users requires either
UPDATEon mysql.default_roles orCREATE USER.Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?