Skip to content

Comments

pkg/ddl: loose the pre-check for temporary table.#65598

Open
bb7133 wants to merge 1 commit intopingcap:masterfrom
bb7133:bb7133/fix_65430
Open

pkg/ddl: loose the pre-check for temporary table.#65598
bb7133 wants to merge 1 commit intopingcap:masterfrom
bb7133:bb7133/fix_65430

Conversation

@bb7133
Copy link
Member

@bb7133 bb7133 commented Jan 15, 2026

What problem does this PR solve?

Issue Number: close #65430

Problem Summary: The current behavior(reporting errors with those attributes) is actually by-design, but now we think it's meaningful to create a temporary table for tables with SHARD_ROW_ID_BITS and PRE_SPLIT_REGIONS, as long as we ignore those 2 attributes for the temporary table.

What changed and how does it work?

Allow CREATE TEMPORARY TABLE ... LIKE to ignore SHARD_ROW_ID_BITS and PRE_SPLIT_REGIONS inherited from the source table. The preprocessor no longer rejects temp table creation when the referenced table uses sharding bits, and the table-info clone clears shard/pre-split settings for temporary tables.

Updated serial DDL tests to expect success and verify SHOW CREATE TABLE for the temporary table omits these options.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • NA

Documentation

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

DDL: `CREATE TEMPORARY TABLE ... LIKE` now ignores `SHARD_ROW_ID_BITS` and `PRE_SPLIT_REGIONS` from the source table, allowing temporary tables to be created successfully.

Now it is allowed to create a temp table for tables with 'SHARD_ROW_ID_BITS' and
'PRE_SPLIT_REGIONS', those 2 attributes will be just ignored.
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed sig/planner SIG: Planner size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 15, 2026
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Jan 15, 2026
@tiprow
Copy link

tiprow bot commented Jan 15, 2026

@bb7133: 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
fast_test_tiprow ab34e81 link true /test fast_test_tiprow

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.

@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.3403%. Comparing base (8333420) to head (ab34e81).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #65598        +/-   ##
================================================
+ Coverage   77.8487%   79.3403%   +1.4915%     
================================================
  Files          1978       1901        -77     
  Lines        542181     529853     -12328     
================================================
- Hits         422081     420387      -1694     
+ Misses       118441     108011     -10430     
+ Partials       1659       1455       -204     
Flag Coverage Δ
integration 47.6786% <100.0000%> (-0.5113%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 56.7974% <ø> (ø)
parser ∅ <ø> (∅)
br 66.3181% <ø> (+5.1755%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jan 15, 2026

@bb7133: The following tests 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-unit-test-next-gen ab34e81 link true /test pull-unit-test-next-gen
idc-jenkins-ci-tidb/unit-test ab34e81 link true /test unit-test
pull-unit-test-ddlv1 ab34e81 link true /test pull-unit-test-ddlv1

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 added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 16, 2026
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jan 16, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: AilinKid, tiancaiamao
Once this PR has been reviewed and has the lgtm label, please assign benjamin2037 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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 16, 2026
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jan 16, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-01-16 01:16:19.190897525 +0000 UTC m=+111006.804854391: ☑️ agreed by tiancaiamao.
  • 2026-01-16 03:22:02.756671677 +0000 UTC m=+118550.370628533: ☑️ agreed by AilinKid.

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

Labels

lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/planner SIG: Planner size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create temporary table like table with shard_row_id_bits fail

3 participants