TiCDC error message is not user-friendly, "Unknown column 'flag' in 'field list'", and it doesn't indicate which table

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’,也不提示哪个表

| username: foxchan

【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.

| username: xfworld | Original post link

Pull up the logs and see if there is a table ID. The table ID can be used to quickly locate it.

| username: xiaohetao | Original post link

The logs should have hints, possibly in the context.

| username: foxchan | Original post link

The tableid involved in the context is not the table that reports the missing column.

| username: 张雨齐0720 | Original post link

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.

| username: 我是咖啡哥 | Original post link

The columns don’t even exist, so how can it indicate which table it is from?

| username: xfworld | Original post link

The logs clearly indicate that this changefeed has encountered an error. Just check the scope and it should be fine, right?

| username: foxchan | Original post link

This changefeed synchronizes 1000 tables, and it doesn’t indicate the table names or log the erroneous SQL, making troubleshooting very difficult.

| username: xfworld | Original post link

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…

| username: foxchan | Original post link

I am troubleshooting by filtering fields from the backup SQL. I hope that CDC can optimize the error logs in the future.