Skip to content
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

ddl: support multi-schema change for drop columns #16

Merged
merged 2 commits into from
Mar 10, 2022

Conversation

tangenta
Copy link
Owner

@tangenta tangenta commented Mar 9, 2022

What problem does this PR solve?

Issue Number: close #15

Problem Summary:

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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

None

ddl/column.go Outdated Show resolved Hide resolved
@@ -3904,14 +3904,14 @@ func checkIsDroppableColumn(ctx sessionctx.Context, t table.Table, spec *ast.Alt
return true, nil
}

func checkDropVisibleColumnCnt(t table.Table, columnCnt int) error {
func checkVisibleColumnCnt(t table.Table, addCnt, dropCnt int) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about combine checkDropVisibleColumnCnt and checkAddColumnTooManyColumns

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to separate them because they make different check.

@Defined2014 Defined2014 merged commit 4bc1a96 into multi-schema-change Mar 10, 2022
tangenta pushed a commit that referenced this pull request Jul 11, 2023
collect and record the min max key in subtask meta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support multi-schema change for drop columns
2 participants