Description:
In InnoDB column renames are metadata only and are instantaneous even for bigger tables.
Renaming a column is a reversible action. This is often used before permanently dropping a column (which is not reversible).
Another use case would be to re-use a column in a big table for another purpose without having to rebuild the whole table.
However in NDB it seems that this is not supported.
docs: https://dev.mysql.com/doc/refman/5.7/en/alter-table-online-operations.html
related: Bug #42002 ONLINE column rename is not supported by NDB doc. indicates otherwise.
related: Bug #80792 ALTER TABLE should support ALGORITHM=METADATA
related: WL#10761: ALTER TABLE RENAME COLUMN
Also note that the error message is wrong. It says that changing the default is not supported, but the default is not changed.
How to repeat:
CREATE TABLE `t1` (
`c1` bigint(20) unsigned NOT NULL,
`c2` bigint(20) unsigned NOT NULL,
`c3` binary(16) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `c2` (`c2`),
KEY `c3` (`c3`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
ALTER TABLE `t1`
CHANGE `c2` `c2_old` bigint(20) unsigned NOT NULL,
ALGORITHM=INPLACE,
LOCK=NONE;
ERROR 1846 (0A000): ALGORITHM=INPLACE is not supported. Reason: Altering default value is not supported. Try ALGORITHM=COPY.