Skip to content

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

Open
doc-claw-bot wants to merge 4 commits into
pingcap:masterfrom
doc-claw-bot:docs-cn/fix-drop-stats-meta-example
Open

sql-statement-drop-stats: fix STATS_META output after DROP STATS#21887
doc-claw-bot wants to merge 4 commits into
pingcap:masterfrom
doc-claw-bot:docs-cn/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)

  • 同步 pingcap/docs#23557 的修订,说明 DROP STATS 会清除直方图相关统计信息,但不会删除 STATS_META 对应行。
  • 更新示例输出,展示执行 DROP STATS 后,SHOW STATS_META 仍会返回 row count 和 modify count。
  • 使中文文档与当前 TiDB 实际行为保持一致。

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

Summary by CodeRabbit

  • 文档
    • 更新 SHOW STATS_META 示例,新增 Last_analyze_time 列。
    • 更新 DROP STATS 示例,展示统计元数据、行数和修改计数仍会保留。
    • 明确说明 TopN、直方图桶等统计信息会被清除,且不再返回空结果。

@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
@doc-claw-bot doc-claw-bot added translation/from-docs This PR is translated from a PR in pingcap/docs. and removed 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
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: 8f7325eb-8b6d-47ef-944c-0426f835f049

📥 Commits

Reviewing files that changed from the base of the PR and between fdc8cf3 and ce5d7d6.

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

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


📝 Walkthrough

Walkthrough

更新 DROP STATS 文档示例。SHOW STATS_META 输出新增 Last_analyze_time。执行 DROP STATS 后,统计元数据、行数和修改计数保留,TopN 和直方图桶被清除。

Changes

DROP STATS 文档更新

Layer / File(s) Summary
统计元数据结果说明
sql-statements/sql-statement-drop-stats.md
新增 Last_analyze_time 列。更新 DROP STATS 结果,说明 STATS_META 记录、行数和修改计数保留,TopN 与直方图桶被清除。

Estimated code review effort: 1 (简单) | ~5 分钟

Merge Risk: ⚪ Minimal · up to ce5d7

This is a localized documentation correction to align the DROP STATS example with current behavior; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 标题准确概括了主要变更:修复执行 DROP STATS 后的 STATS_META 输出。标题简洁、明确,并与变更内容一致。
Description check ✅ Passed 描述已填写所有必需部分,说明了变更内容、适用版本、关联 PR 和 AI agent 参与情况。内容与变更目标一致。
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.
Full details: Docstring Coverage

Explanation

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 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 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 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 oreoxmt 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 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.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 31e0fbac-209e-4c15-abf9-ee785d3ef576

📥 Commits

Reviewing files that changed from the base of the PR and between 41add7f and 3891dc3.

📒 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.

Comment thread sql-statements/sql-statement-drop-stats.md Outdated
Comment thread sql-statements/sql-statement-drop-stats.md Outdated
@qiancai qiancai added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Aug 25, 2026
Comment thread sql-statements/sql-statement-drop-stats.md Outdated
Comment thread sql-statements/sql-statement-drop-stats.md Outdated
@ti-chi-bot

ti-chi-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

@time-and-fate: adding LGTM is restricted to approvers and reviewers in OWNERS files.

Details

In response to this:

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.

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. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. translation/from-docs This PR is translated from a PR in pingcap/docs. type/bugfix This PR fixes a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants