Skip to content

Document IMPORT INTO restriction for TTL-enabled tables - #21881

Open
lilin90 wants to merge 2 commits into
pingcap:masterfrom
lilin90:codex/document-import-into-ttl-restriction-23507
Open

Document IMPORT INTO restriction for TTL-enabled tables#21881
lilin90 wants to merge 2 commits into
pingcap:masterfrom
lilin90:codex/document-import-into-ttl-restriction-23507

Conversation

@lilin90

@lilin90 lilin90 commented Aug 12, 2026

Copy link
Copy Markdown
Member

What is changed, added or deleted? (Required)

Document that IMPORT INTO does not support importing data into a table with TTL enabled.

The restrictions list already covered temporary and cached tables but omitted TTL-enabled tables. As described in pingcap/tidb#70426, an asynchronous TTL job can delete rows while an import is running, which can cause the final checksum verification to fail. This update closes that documentation gap so users can avoid running IMPORT INTO against an unsupported target table.

Validation: ./scripts/markdownlint sql-statements/sql-statement-import-into.md and git diff --check.

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.

  • 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

  • 文档
    • 更新 IMPORT INTO 使用限制:不支持将数据导入启用 TTL 的表。
    • 保持临时表和缓存表的现有限制不变。

@lilin90 lilin90 added translation/from-docs This PR is translated from a PR in pingcap/docs. v9.0-beta.3 This PR/issue applies to TiDB v9.0-beta.3. labels Aug 12, 2026
@ti-chi-bot ti-chi-bot Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 12, 2026
@lilin90 lilin90 self-assigned this Aug 12, 2026
@lilin90
lilin90 requested a review from D3Hunter August 12, 2026 07:49
Synced from: pingcap/docs#23507
Target PR: pingcap#21881

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Auto-sync completed successfully

Source PR: pingcap/docs#23507
Target PR: #21881

Chinese documentation has been updated based on English documentation changes.

@ti-chi-bot

ti-chi-bot Bot commented Aug 12, 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 ask for approval from lilin90. 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 12, 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: 8a6be98d-2981-479a-aa22-96c4a502aab2

📥 Commits

Reviewing files that changed from the base of the PR and between 26f202b and 1093f41.

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

📝 Walkthrough

Walkthrough

Changes

IMPORT INTO 使用限制

Layer / File(s) Summary
新增 TTL 表限制
sql-statements/sql-statement-import-into.md
文档规定启用了 TTL 的表不得作为 IMPORT INTO 的目标表。临时表和缓存表的限制保持不变。

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

Possibly related issues

  • pingcap/tidb#70426:该变更直接补充了该 issue 中关于 TTL 表不能作为 IMPORT INTO 目标表的限制。

Suggested reviewers: d3hunter

🚥 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 标题准确概括了本次变更,即记录 IMPORT INTO 对启用 TTL 表的限制。
Description check ✅ Passed 描述完整说明了变更内容、原因、适用版本、相关链接和验证方式,且已填写必要版本选项。
✨ 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 12, 2026

Copy link
Copy Markdown

@D3Hunter: 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

size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. translation/from-docs This PR is translated from a PR in pingcap/docs. v9.0-beta.3 This PR/issue applies to TiDB v9.0-beta.3.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants