|
The instant ALTER TABLE changes related to MDEV-11424 are using an unnecessarily complex set of API calls. MDEV-29495 improved this by introducing the virtual member function handler::can_convert_nocopy(). This should be cleaned up further by moving the logic from the MDEV-14016 function instant_alter_column_possible() to ha_innobase::can_convert_nocopy(). bar thinks that this is a prerequisite for implementing MDEV-30934.
The high level idea is that handler::can_convert_nocopy() checks if a table rebuild can be avoided for altering a column definition, by checking if:
- the data type of the new column is semantically a super type for the old column, and
- the low level encoding for all data of the old column is compatible with the encoding of the new column.
|