Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: dm自动忽略truncate语句
【TiDB Version】6.1.0
【Encountered Issue】DM automatically ignores truncate statements
【Issue Phenomenon and Impact】
Using DM to synchronize MySQL data to TiDB, a primary key conflict is prompted. Upon checking the binlog, it is found that MySQL first truncates the table and then reinserts the data. At this point, the DM task reports a primary key conflict and synchronization is interrupted. The DM task configuration file does not configure events: [“truncate table”, “drop table”], and the user being used has all permissions.