You are viewing the documentation of an older version of the TiDB database (TiDB v5.4). It is recommended that you use the latest LTS version of the TiDB database.
Special Handling of DM DDLs
When TiDB Data Migration (DM) migrates data, it parses the DDL statements and handles them according to the statement type and the current migration stage.
Skip DDL statements
The following statements are not supported by DM, so DM skips them directly after parsing.
The following statements are rewritten before being replicated to the downstream.
Original statement
Rewritten statement
^CREATE DATABASE...
^CREATE DATABASE...IF NOT EXISTS
^CREATE TABLE...
^CREATE TABLE..IF NOT EXISTS
^DROP DATABASE...
^DROP DATABASE...IF EXISTS
^DROP TABLE...
^DROP TABLE...IF EXISTS
^DROP INDEX...
^DROP INDEX...IF EXISTS
Shard merge migration tasks
When DM merges and migrates tables in pessimistic or optimistic mode, the behavior of DDL replication is different from that in other scenarios. For details, refer to Pessimistic Mode and Optimistic Mode.