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

Implement "drop column with index" through dropping index before dropping column #40342

Open
YangKeao opened this issue Jan 5, 2023 · 0 comments
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@YangKeao
Copy link
Member

YangKeao commented Jan 5, 2023

Enhancement

For alter table xxx drop column xxx statement, it will drop both the column and its index. It brings some problems (e.g. #40192). It's also not online-enough in some cases: if a NOT NULL UNIQUE column is in write-only mode, the user cannot actually write any data into the table, because the default value of this column is always inserted and checked as duplicated... (though, sounds not like a big problem).

We could try to implement "drop column with index" in multiple steps: drop the index first and then drop the column. It will fix this problem. It'll also make the routine of dropping column more unified with other implementations.

@YangKeao YangKeao added the type/enhancement The issue or PR belongs to an enhancement. label Jan 5, 2023
@YangKeao YangKeao changed the title Implement drop column with multi-schema change (with order) Implement "drop column with index" through dropping index before dropping column Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

1 participant