Skip to content

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

Open
D3Hunter wants to merge 1 commit into
pingcap:masterfrom
D3Hunter:codex/document-import-into-ttl-restriction
Open

Document IMPORT INTO restriction for TTL-enabled tables#23507
D3Hunter wants to merge 1 commit into
pingcap:masterfrom
D3Hunter:codex/document-import-into-ttl-restriction

Conversation

@D3Hunter

@D3Hunter D3Hunter commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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

  • Documentation
    • Updated IMPORT INTO restrictions to clarify that tables with TTL enabled cannot be used as import targets, alongside temporary and cached tables.

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

@ti-chi-bot ti-chi-bot Bot added missing-translation-status This PR does not have translation status info. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 12, 2026
@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: 0bd4b838-b46d-43a7-85d9-78a99ea1f104

📥 Commits

Reviewing files that changed from the base of the PR and between 97bbec4 and a2970a4.

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

📝 Walkthrough

Walkthrough

The IMPORT INTO documentation now prohibits imports into tables with TTL enabled. Existing restrictions for temporary and cached tables remain.

Changes

IMPORT INTO restrictions

Layer / File(s) Summary
Document TTL restriction
sql-statements/sql-statement-import-into.md
The restriction now includes tables with TTL enabled alongside temporary and cached tables.

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

Possibly related issues

  • pingcap/tidb#70426 — Both changes reject IMPORT INTO operations for tables with TTL enabled.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change, rationale, validation, links, and selected versions, but it omits v8.5 listed in the PR objectives. Update the version checklist to include v8.5 if this documentation change applies to that release.
✅ Passed checks (4 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 and concisely describes the documented restriction for IMPORT INTO and TTL-enabled tables.
✨ 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.

@D3Hunter D3Hunter changed the title [codex] Document IMPORT INTO restriction for TTL-enabled tables Document IMPORT INTO restriction for TTL-enabled tables Aug 12, 2026
@ti-chi-bot

ti-chi-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

@joechenrh: 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.

@lilin90 lilin90 self-assigned this Aug 12, 2026
@ti-chi-bot ti-chi-bot Bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Aug 12, 2026
@ti-chi-bot

ti-chi-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

[LGTM Timeline notifier]

Timeline:

  • 2026-08-12 07:43:16.880575678 +0000 UTC m=+3205182.916670735: ☑️ agreed by lilin90.

@lilin90 lilin90 added v9.0-beta.3 This PR/issue applies to TiDB v9.0-beta.3. and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 12, 2026
@lilin90 lilin90 added the translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. label Aug 12, 2026
@ti-chi-bot ti-chi-bot Bot removed the missing-translation-status This PR does not have translation status info. label Aug 12, 2026
github-actions Bot added a commit to lilin90/docs-cn that referenced this pull request Aug 12, 2026
Synced from: pingcap/docs#23507
Target PR: pingcap#21881

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. 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.

3 participants