pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
36.98k stars 5.82k forks source link

DM lost TRUNCATE TABLE for sync mysql to tidb #55650

Open zjcxc opened 1 month ago

zjcxc commented 1 month ago

When synchronizing mysql to tidb using DM 8.1, I noticed that the "truncate table" statements executed in mysql were not executed in tidb. When I execute the "truncte table xx" statement in upstream mysql, the data in tidb still exists, which causes me to get a Duplicate entry '1' for xx exception when I insert data into the table later

lance6716 commented 1 month ago

This is a known problem, we will track it in https://github.com/pingcap/tiflow/issues/5055