Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: ticdc无法同步ddl操作

[TiDB Usage Environment] Production Environment / Testing / Poc
Testing environment running in k8s
[TiDB Version]
v5.4.1
[Reproduction Path] What operations were performed to cause the issue
Normal start of ticdc for incremental data synchronization to MySQL and Kafka
[Encountered Issue] DML operations can be synchronized to Kafka and MySQL normally, but DDL operations cannot be synchronized to MySQL and Kafka
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]
Test Program:
[root@vm10-0-2-6 ticdc]# cat operate.sh
namespace=$bbb
Db=$1
Host=`kubectl get svc -n $namespace | grep basic-tidb | grep -v peer | awk '{print $3}'`
while true
do
if [[ $2 == "dml" ]];then
createTime=`date "+%Y-%m-%d %H:%M:%S"`
echo "dml >>>>>>>> $createTime"
mysql -u$User -p$Passwd -h $Host -P 4000 -e "create database if not exists $Db;use $Db;CREATE TABLE if not exists aaa (id int(11) NOT NULL AUTO_INCREMENT,create_time datetime DEFAULT NULL,PRIMARY KEY (id)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;insert into aaa(create_time) values ('$createTime');"
else
suffix=`date "+%H_%M_%S"`
echo "ddl >>>>>>>> $suffix"
mysql -u$User -p$Passwd -h $Host -P 4000 -e "create database if not exists $Db;use $Db;CREATE TABLE if not exists aaa_${suffix} (id int(11) NOT NULL AUTO_INCREMENT,create_time datetime DEFAULT NULL,PRIMARY KEY (id)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;"
fi
sleep 1
done
DML synchronization monitoring
DDL synchronization monitoring