-
Notifications
You must be signed in to change notification settings - Fork 285
to hotfix: fix clone indexes when alter table. #23260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
User description
What type of PR is this?
Which issue(s) this PR fixes:
issue ##23258
What this PR does / why we need it:
Fixing the ALTER TABLE with a full-text index will cause index data duplication.
PR Type
Bug fix
Description
Prevent index data duplication during ALTER TABLE operations
Skip inserting into indexes marked for cloning in copy operations
Add
skipIndexesCopyparameter to track indexes being clonedAdd comprehensive test cases for ALTER TABLE with various index types
Diagram Walkthrough
File Walkthrough
build_dml_util.go
Add index cloning skip logic to prevent duplicationpkg/sql/plan/build_dml_util.go
skipIndexesCoypvariable to track indexes being cloned duringALTER TABLE
SkipIndexesCopyfromAlterCopyOptcontext when availableskipIndexesCopymapbuildInsertPlansWithRelatedHiddenTableto accept
skipIndexesCopyparameterskipIndexesCopyparameterclone_in_alter_table_2.sql
Add test cases for ALTER TABLE index cloningtest/distributed/cases/snapshot/clone/clone_in_alter_table_2.sql
various index types
indexes
clone_in_alter_table_2.result
Add expected test results for ALTER TABLEtest/distributed/cases/snapshot/clone/clone_in_alter_table_2.result
operations
indexes