MySQL 8.0.29之前,在线 DDL 操作中即时添加列只能添加在表的最后一列
MySQL 8.0.29 扩展了对 ALTER TABLE … ALGORITHM=INSTANT 的支持:
用户可以在表的任何位置即时添加列、即时删除列、添加列时评估行大小限制

(root@node01) > alter table customer add column c_comment varchar(200);
Query OK, 0 rows affected (0.51 sec)
Records: 0  Duplicates: 0  Warnings: 0

(root@node01) > alter table customer drop column c_comment;
Query OK, 0 rows affected (0.13 sec)
Records: 0  Duplicates: 0  Warnings: 0

(root@node01) > alter table customer add column c_comment varchar(200) after c_delivery_cnt;
Query OK, 0 rows affected (0.10 sec)
Records: 0  Duplicates: 0  Warnings: 0