privileges: fix TiDB panic when security.skip-grant-table is true#61791
privileges: fix TiDB panic when security.skip-grant-table is true#61791ti-chi-bot[bot] merged 1 commit intopingcap:masterfrom
security.skip-grant-table is true#61791Conversation
|
Hi @djshow832. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #61791 +/- ##
================================================
+ Coverage 73.0339% 73.4728% +0.4388%
================================================
Files 1730 1730
Lines 481684 481703 +19
================================================
+ Hits 351793 353921 +2128
+ Misses 108329 106208 -2121
- Partials 21562 21574 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CbcWestwolf, Defined2014 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
…61791) (#195) Reviewed-on: https://git.pingcap.net/pingkai/tidb/pulls/195 Reviewed-by: tianyuan <tianyuan@pingcap.cn> Co-authored-by: yuchen.ding <yuchen.ding@pingcap.cn> Co-committed-by: yuchen.ding <yuchen.ding@pingcap.cn>
What problem does this PR solve?
Issue Number: close #61790
Problem Summary:
When
max_user_connectionswas introduced in #59197, the privilege system didn't considerskip-grant-table, which skips loading the privilege system.What changed and how does it work?
If
skip-grant-tableis true, do not querymax_user_connectionsand directly return.I've checked other functions in
UserPrivileges, no other similar problems.It's introduced in v9.0.0-beta.1 so it doesn't need a release note.
Check List
Tests
Steps:
security.skip-grant-tableand OS root privilege.mysql -h127.1 -uroot -P4000Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.