ALTER TABLE Statement ALTER TABLE  upgrades MySQL 5.5 temporal columns to 5.6 format for  ADD COLUMN ,  CHANGE COLUMN , MODIFY COLUMN ,  ADD INDEX , and  FORCE  operations. This conversion cannot be done using the INPLACE  algorithm because the table must be rebuilt, so specifying  ALGORITHM=INPLACE  in these cases results in an error. Specify  ALGORITHM=COPY  if necessary. If an  ALTER TABLE  operation on a multicolumn index used to partition a table by  KEY  changes the order of the columns, it can only be performed using  ALGORITHM=COPY . The  WITHOUT VALIDATION  and  WITH VALIDATION  clauses affect whether  ALTER TABLE  performs an in-place operation for virtual generated column modifications. See Section 13.1.9.2, “ALTER TABLE and Generated Columns” . NDB Cluster 8.0 supports online operations using the same  ALGORITHM=INPLACE  syntax used with the standard MySQL Server.  NDB  does not support changing a tablespace online; beginning with NDB 8.0.21, it is disallowed. See Section 23.5.11, “Online Operations with ALTER TABLE in NDB Cluster” , for more information. ALTER TABLE  with  DISCARD ... PARTITION ... TABLESPACE  or  IMPORT ... PARTITION ... TABLESPACE  does not create any temporary tables or temporary partition files. ALTER TABLE  with  ADD PARTITION ,  DROP PARTITION ,  COALESCE PARTITION ,  REBUILD PARTITION , or  REORGANIZE PARTITION  does not create temporary tables (except when used with  NDB tables); however, these operations can and do create temporary partition files. ADD  or  DROP  operations for  RANGE  or  LIST  partitions are immediate operations or nearly so.  ADD  or COALESCE  operations for  HASH  or  KEY  partitions copy data between all partitions, unless  LINEAR HASH or  LINEAR KEY  was used; this is effectively the same as creating a new table, although the  ADD  or COALESCE  operation is performed partition by partition.  REORGANIZE  operations copy only changed partitions and do not touch unchanged ones. For  MyISAM  tables, you can speed up index re-creation (the slowest part of the alteration process) by setting the  myisam_sort_buffer_size  system variable to a high value. For  ALTER TABLE  operations that support it, you can use the  LOCK  clause to control the level of concurrent reads and writes on a table while it is being altered. Specifying a non-default value for this clause enables you to require a certain amount of concurrent access or exclusivity during the alter operation, and halts the operation if the requested degree of locking is not available. Only  LOCK = DEFAULT  is permitted for operations that use  ALGORITHM=INSTANT . The other  LOCK clause parameters are not applicable. The parameters for the  LOCK  clause are: Maximum level of concurrency for the given  ALGORITHM  clause (if any) and  ALTER TABLE  operation: Permit concurrent reads and writes if supported. If not, permit concurrent reads if supported. If not, enforce exclusive access. Concurrency Control If supported, permit concurrent reads and writes. Otherwise, an error occurs. 2489 • LOCK = DEFAULT • LOCK = NONE • LOCK = SHARED