The mechanism used for DDL operations on partitioned tables is somewhat different from the online
DDL discussed throughout this section. The partitioning clauses of the
alter table statement
are only allowed in conjunction with algorithm=default and lock=default. Although these
operations do not go through the same internal online DDL API as for non-partitioned tables, MySQL
still attempts to minimize data copying and locking where possible:
•add partition and drop partition for ta bies partitioned by rangę or list do not copy any existing data.
• truncate partition does not copy any existing data, for all types of partitioned tables.
• Concurrent queries are allowed during add partition and coalesce partition for tables
partitioned by hash or list. MySQL copies the data while holding a shared lock.
• ForREORGANIZE PARTITION, REBUILD PARTITION, OrADD PARTITION orCOALESCE
partition for a table partitioned by linear hash or list, concurrent queries are allowed. Data
from the affected partitions is copied while holding a shared lock.