Skip to content

ddl: remove duplicate RestoreWithoutSchemaName flag (#66233)#69934

Open
yy782 wants to merge 1 commit into
pingcap:masterfrom
yy782:fix/remove-duplicate-restore-without-schema-name
Open

ddl: remove duplicate RestoreWithoutSchemaName flag (#66233)#69934
yy782 wants to merge 1 commit into
pingcap:masterfrom
yy782:fix/remove-duplicate-restore-without-schema-name

Conversation

@yy782

@yy782 yy782 commented Jul 19, 2026

Copy link
Copy Markdown

What problem does this PR solve?

Issue Number: close #66233

Problem Summary:
remove duplicate RestoreWithoutSchemaName flag

What changed and how does it work?

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

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

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

None

Summary by CodeRabbit

  • Bug Fixes
    • Corrected generated-expression handling during column modifications to ensure schema names are restored consistently.

@ti-chi-bot ti-chi-bot Bot added the release-note-none Denotes a PR that doesn't merit a release note. label Jul 19, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jul 19, 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 xhebox 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 contribution This PR is from a community contributor. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels Jul 19, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown

Hi @yy782. Thanks for your PR.

I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@ti-chi-bot

ti-chi-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown

Welcome @yy782!

It looks like this is your first PR to pingcap/tidb 🎉.

I'm the bot to help you request reviewers, add labels and more, See available commands.

We want to make sure your contribution gets all the attention it needs!



Thank you, and welcome to pingcap/tidb. 😃

@ti-chi-bot ti-chi-bot Bot added the first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. label Jul 19, 2026
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: bda39840-339d-4546-b72f-b09f92fc5168

📥 Commits

Reviewing files that changed from the base of the PR and between cae12c1 and 32e7146.

📒 Files selected for processing (1)
  • pkg/ddl/modify_column.go

📝 Walkthrough

Walkthrough

ProcessModifyColumnOptions now constructs its generated-expression restore flags without duplicating format.RestoreWithoutSchemaName. No other function logic or public declarations changed.

Changes

Generated expression restore configuration

Layer / File(s) Summary
Deduplicate restore flags
pkg/ddl/modify_column.go
Removes the duplicate format.RestoreWithoutSchemaName entry from the restoreFlags bitmask.

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

Suggested reviewers: fzzf678

Poem

A bunny spots a flag twice,
And tidies up the code so nice.
One schema name flag remains,
Cleaner bits run through the lanes.
Hop, hop—no duplicate twice!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately describes the main code change: removing a duplicate restore flag.
Description check ✅ Passed The description includes the issue number, problem summary, checklist, and release note; only the work-details section is left blank.
Linked Issues check ✅ Passed The change removes the duplicate RestoreWithoutSchemaName flag in ProcessModifyColumnOptions as requested by #66233.
Out of Scope Changes check ✅ Passed The only code change is the requested flag cleanup in modify_column.go, with no unrelated edits present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="Running error: context loading failed: failed to load packages: failed to load packages: failed to load with go/packages: context deadline exceeded"
level=error msg="Timeout exceeded: try increasing it by passing --timeout option"


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. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Identical sub-expressions 'format.RestoreWithoutSchemaName' inside 'ProcessModifyColumnOptions' function

1 participant