Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: DM 合并以后同步报错: Column count doesn’t match value count: 27 (columns) vs 26 (values)"
In the online V5.4.1 version, the upstream MySQL has multiple tables created annually (with the same table structure, 26 fields). These tables are merged into a downstream summary table through DM (with an additional field, an implicit primary key ID set to AUTO_RANDOM). During synchronization, it reports “Column count doesn’t match value count: 27 (columns) vs 26 (values).” Manually using the command tiup dmctl --master-addr xxxx operate-schema set -s pay-replica-01 pay -d snspaycenter -t t_order_2018 snspaycenter.t_order_2018-schema.sql
to specify the table structure that matches the binlog event. However, the error still occasionally occurs, requiring repeated execution of the above command to fix it. Is there any way to fix this type of error once and for all?
[Attachment]
Please provide the version information of each component, such as cdc/tikv, which can be obtained by executing
cdc version
/tikv-server --version
.