Skip to content

sql: remove unnecessary 'copy' from FLUSH PRIVILEGES description (#23196) - #23753

Open
ti-chi-bot wants to merge 1 commit into
pingcap:masterfrom
ti-chi-bot:cherry-pick-23196-to-master
Open

sql: remove unnecessary 'copy' from FLUSH PRIVILEGES description (#23196)#23753
ti-chi-bot wants to merge 1 commit into
pingcap:masterfrom
ti-chi-bot:cherry-pick-23196-to-master

Conversation

@ti-chi-bot

@ti-chi-bot ti-chi-bot commented Sep 7, 2026

Copy link
Copy Markdown
Member

This is an automated cherry-pick of #23196

What is changed, added or deleted? (Required)

Align the FLUSH PRIVILEGES description with MySQL documentation. Changed:

  • reload the in-memory copy of privileges from the privilege tables
  • reload the grant tables into memory

MySQL's own documentation at https://dev.mysql.com/doc/refman/8.4/en/privilege-changes.html uses reload the grant tables without copy. TiDB documentation should follow the same concise style.

Which TiDB version(s) do your changes apply to? (Required)

  • master (the latest development version)
  • v8.5 (TiDB 8.5 versions)
  • v8.4 (TiDB 8.4 versions)
  • v8.3 (TiDB 8.3 versions)
  • v8.2 (TiDB 8.2 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)
  • v5.3 (TiDB 5.3 versions)

What is the related PR or file link(s)?

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch

Summary by CodeRabbit

  • Documentation
    • Clarified the description of FLUSH PRIVILEGES, including how privileges are refreshed from privilege tables.
    • Updated the SQL statement overview with revised account-management and privilege-refresh wording.
    • The overview currently contains duplicated, conflicting account-management content that should be resolved.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot ti-chi-bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm needs-1-more-lgtm Indicates a PR needs 1 more LGTM. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. type/cherry-pick-for-master This PR is cherry-picked to master from a source PR. labels Sep 7, 2026
@ti-chi-bot

Copy link
Copy Markdown
Member Author

@yahonda This PR has conflicts, I have hold it.
Please resolve them or ask others to resolve them, then comment /unhold to remove the hold label.

@ti-chi-bot

ti-chi-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown

@ti-chi-bot: ## If you want to know how to resolve it, please read the guide in TiDB Dev Guide.

Details

Instructions 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 ti-community-infra/tichi repository.

@ti-chi-bot

ti-chi-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign lilin90 for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 7, 2026
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change rewords the FLUSH PRIVILEGES documentation. It also adds an unresolved merge conflict and duplicate account management table to the SQL statement overview.

Changes

FLUSH PRIVILEGES documentation

Layer / File(s) Summary
Update statement description
sql-statements/sql-statement-flush-privileges.md
The description now refers to TiDB's in-memory privilege cache and privilege tables such as mysql.user.
Update overview table
sql-statements/sql-statement-overview.md
The overview contains a duplicate account management table and unresolved merge-conflict markers.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🟡 Moderate · up to 0e0a7

The documentation update would publish unresolved merge-conflict text and duplicate the account-management statement table, leaving users with malformed and inconsistent SQL reference content. Resolve the conflict and retain one updated table before merging.

Suggested reviewers: 0xpoe

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the intended documentation change: removing “copy” from the FLUSH PRIVILEGES description.
Description check ✅ Passed The description includes the required change summary, affected version, and reference link. Optional checklist items are omitted, but the required information is present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ti-chi-bot

ti-chi-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown

@ti-chi-bot: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-verify 0e0a75f link true /test pull-verify

Full PR test history. Your PR dashboard.

Details

Instructions 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. I understand the commands that are listed here.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
sql-statements/sql-statement-overview.md (1)

274-314: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Resolve the merge conflict before merging.

The <<<<<<< HEAD, =======, and >>>>>>> markers remain in the document. The file also contains two competing Account management tables. Remove the conflict markers and retain one table with the updated FLUSH PRIVILEGES description.

| SQL Statement                                                               | Description                                                         |
| --------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| [`ALTER USER`](/sql-statements/sql-statement-alter-user.md)                 | Modifies a user.                                                    |
| [`CREATE ROLE`](/sql-statements/sql-statement-create-role.md)               | Creates a role.                                                     |
| [`CREATE USER`](/sql-statements/sql-statement-create-user.md)               | Creates a new user.                                                 |
| [`DROP ROLE`](/sql-statements/sql-statement-drop-role.md)                   | Drops an existing role.                                             |
| [`DROP USER`](/sql-statements/sql-statement-drop-user.md)                   | Drops an existing user.                                             |
| [`FLUSH PRIVILEGES`](/sql-statements/sql-statement-flush-privileges.md)     | Refreshes the in-memory privilege cache from the privilege tables. |
| [`GRANT <privileges>`](/sql-statements/sql-statement-grant-privileges.md)   | Grants privileges.                                                  |
| [`GRANT <role>`](/sql-statements/sql-statement-grant-role.md)               | Grants a role.                                                      |
| [`RENAME USER`](/sql-statements/sql-statement-rename-user.md)               | Renames an existing user.                                           |
| [`REVOKE <privileges>`](/sql-statements/sql-statement-revoke-privileges.md) | Revokes privileges.                                                 |
| [`REVOKE <role>`](/sql-statements/sql-statement-revoke-role.md)             | Revokes a role.                                                     |
| [`SET DEFAULT ROLE`](/sql-statements/sql-statement-set-default-role.md)     | Sets a default role.                                                |
| [`SET PASSWORD`](/sql-statements/sql-statement-set-password.md)             | Changes a password.                                                 |
| [`SET ROLE`](/sql-statements/sql-statement-set-role.md)                     | Enables roles in the current session.                               |
| [`SHOW CREATE USER`](/sql-statements/sql-statement-show-create-user.md)     | Shows the `CREATE` statement for a user.                            |
| [`SHOW GRANTS`](/sql-statements/sql-statement-show-grants.md)               | Shows privileges associated with a user.                             |
| [`SHOW PRIVILEGES`](/sql-statements/sql-statement-show-privileges.md)       | Shows available privileges.                                         |

As per path instructions: provide a committable suggestion for contiguous Markdown fixes.

Source: Path instructions


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 6ea6790a-b172-4e2d-835b-5ecf6c5c59b8

📥 Commits

Reviewing files that changed from the base of the PR and between f515483 and 0e0a75f.

📒 Files selected for processing (2)
  • sql-statements/sql-statement-flush-privileges.md
  • sql-statements/sql-statement-overview.md

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm needs-1-more-lgtm Indicates a PR needs 1 more LGTM. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/cherry-pick-for-master This PR is cherry-picked to master from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants