Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: ticdc 报错信息不友好,Unknown column ‘flag’ in ‘field list’,也不提示哪个表
【TiDB Usage Environment】Production
【TiDB Version】5.4.2
【Encountered Problem】
CDC error
[CDC:ErrReachMaxTry]reach maximum try: 8, error: [CDC:ErrMySQLTxnError]MySQL txn error: Error 1054: Unknown column 'flag' in 'field list': [CDC:ErrMySQLTxnError]MySQL txn error: Error 1054: Unknown column 'flag' in 'field list',
It also doesn’t indicate which table, making it difficult to quickly locate the exception.
Pull up the logs and see if there is a table ID. The table ID can be used to quickly locate it.
The logs should have hints, possibly in the context.
The tableid involved in the context is not the table that reports the missing column.
Is the MySQL standard error the same as this? I remember encountering this kind of error when I was developing an application before.
It’s definitely best to include it.
The columns don’t even exist, so how can it indicate which table it is from?
The logs clearly indicate that this changefeed has encountered an error. Just check the scope and it should be fine, right?
This changefeed synchronizes 1000 tables, and it doesn’t indicate the table names or log the erroneous SQL, making troubleshooting very difficult.
At present, there doesn’t seem to be a good solution. You can only do the segmentation when setting up the changefeed…
Or, you can look for the relevant region in the context and get the table ID through the region ID. This might be more reliable. There aren’t any other good methods…
I am troubleshooting by filtering fields from the backup SQL. I hope that CDC can optimize the error logs in the future.