Skip to content

sql-statement-drop-stats: fix STATS_META output after DROP STATS - #23557

Open
doc-claw-bot wants to merge 1 commit into
pingcap:masterfrom
doc-claw-bot:docs/fix-drop-stats-meta-example
Open

sql-statement-drop-stats: fix STATS_META output after DROP STATS#23557
doc-claw-bot wants to merge 1 commit into
pingcap:masterfrom
doc-claw-bot:docs/fix-drop-stats-meta-example

Conversation

@doc-claw-bot

@doc-claw-bot doc-claw-bot commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

What is changed, added or deleted? (Required)

  • Clarify that DROP STATS removes histogram-related statistics but does not delete the STATS_META row.
  • Update the example output to show that SHOW STATS_META still returns the row count and modify count after DROP STATS.
  • Align the statement page with the current TiDB behavior verified during doc feedback handling.

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

  • master (the latest development version)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 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)

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

AI agent involvement

  • The changes in this PR were primarily made by an AI agent on behalf of the PR author.

Do your changes match any of the following descriptions?

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

@doc-claw-bot doc-claw-bot added the type/bugfix This PR fixes a bug. label Aug 18, 2026
@ti-chi-bot ti-chi-bot Bot added contribution This PR is from a community contributor. missing-translation-status This PR does not have translation status info. labels Aug 18, 2026
@ti-chi-bot ti-chi-bot Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 18, 2026
@doc-claw-bot doc-claw-bot added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed missing-translation-status This PR does not have translation status info. labels Aug 18, 2026
@ti-chi-bot

ti-chi-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

@doc-claw-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 83b729c 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.

@ti-chi-bot

ti-chi-bot Bot commented Aug 18, 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 csuzhangxc 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

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e8f01224-482a-4cc1-90f0-2189d332de90

📥 Commits

Reviewing files that changed from the base of the PR and between 763bb1f and 83b729c.

📒 Files selected for processing (1)
  • sql-statements/sql-statement-drop-stats.md

Included review availability: Your plan includes up to 4 reviews per rolling hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The DROP STATS example now shows that STATS_META retains row and modify counts while histogram statistics, including TopN and buckets, are cleared.

Changes

DROP STATS documentation

Layer / File(s) Summary
Update STATS_META example
sql-statements/sql-statement-drop-stats.md
The expected result now shows the retained metadata row and counts after DROP STATS. The example states that histogram-related statistics are cleared.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 83b72

This localized documentation update clarifies the expected output after DROP STATS and is merge-ready after normal checks, with no actionable merge-blocking risk remaining.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title clearly identifies the affected statement and the corrected STATS_META output.
Description check ✅ Passed The description covers the required change, affected version, reference link, AI involvement, and scope checks.
✨ 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.

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

Labels

contribution This PR is from a community contributor. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. type/bugfix This PR fixes a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant