[MDEV-30969] Some ALGORITHM=INSTANT checks are missing from handler::can_convert_nocopy() Created: 2023-03-30  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Unresolved Votes: 0
Labels: refactoring

Issue Links:
Blocks
blocks MDEV-30934 InnoDB: Changing a Column Data Type f... Open
is blocked by MDEV-29495 Generalize can_convert_xxx() hook eng... Closed
Relates
relates to MDEV-14016 Allow instant ADD COLUMN, ADD INDEX, ... Closed

 Description   

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.

Generated at Thu Feb 08 10:20:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.