I believe the following will happen:
- Your
DROP INDEX
(which really runs an ALTER TABLE ... DROP INDEX
) runs on the master
- If the ALTER completes successfully the statement will then be added to the binlog and will be run on the slave
This means that the ALTER TABLE
on the other machine won't start until the ALTER TABLE
has successfully completed on the first (master) machine.
While the ALTER TABLE
is running on either machine the table will be readable for a while and then neither readable/writeable as MySQL first makes a copy of the table internally then applies the changes.
From http://dev.mysql.com/doc/refman/5.0/en/alter-table.html
In most cases, ALTER TABLE works by
making a temporary copy of the
original table. The alteration is
performed on the copy, and then the
original table is deleted and the new
one is renamed. While ALTER TABLE is
executing, the original table is
readable by other sessions. Updates
and writes to the table are stalled
until the new table is ready, and then
are automatically redirected to the
new table without any failed updates.
The temporary table is created in the
database directory of the new table.
This can be different from the
database directory of the original
table if ALTER TABLE is renaming the
table to a different database.