You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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 aNOT 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.
The text was updated successfully, but these errors were encountered: