According to the MySQL 5.7 Documentation under the subheading
Affected DDL statements, here is what says about Locking for DDL on Partitioned Tables:
CREATE VIEW does not cause any locks.
ALTER TABLE ... EXCHANGE PARTITION prunes locks; only the exchanged
table and the exchanged partition are locked.
ALTER TABLE ... TRUNCATE PARTITION prunes locks; only the partitions
to be emptied are locked.
In addition, ALTER TABLE statements take metadata locks on the table
As far as I can see in that page, it locks the table's metadata. There is nothing here suggesting that all the
.ibd files of the other partitions need to be flushed. It would affect only those files involved.
In your case, it would involve the following steps:
- Acquire metadata lock on the
.par file of the partitioned table
- Update list of partitions in the
- Remove locks of
.ibd you are going to drop
- Unlock the
NOTE : Dropping a partition is DDL not DML.
DIRECT ANSWER TO YOUR QUESTION
Only partition to be dropped