The engine API have hooks to let the engine decide if it can perform ALGORITHM=NOCOPY for a minor data type change.
Originally they were implemented to handle ALTER changing a column character set from CHARACTER SET utf8mb3 to CHARACTER SET utf8mb4 without having to rebuild the table:
The above ALTER does not rebuild the table, it only modifies the FRM file.
The hooks that we have so far can handle only string data types. They are implemented in these "class handler" methods, overridden by ha_innodb:
In order to fix
MDEV-29481, we may need a hook for the DOUBLE data type.
It's not desirable to add a new "can_convert_double()" method.
Let's remove the above three virtual methods and add one method which can handle any arbitrary data type: