go-mysql-org / go-mysql

a powerful mysql toolset with Go
MIT License
4.57k stars 971 forks source link

When the order of fields in the data table is changed, the binlog log is confused. #905

Open ccke opened 1 month ago

ccke commented 1 month ago

Hello, when I perform the following steps:

  1. Start canal and monitor table A
  2. Change the field order of table A
  3. Debug binlog to change data and find that data confusion occasionally occurs.

I'm wondering what could be the reason for this? What needs to be done?

ccke commented 2 weeks ago

Table schema: 3fda74ce-9df4-40b4-8e06-aa48d1dd0c62

Canal table columns: 366b28a7-d91a-42ba-b446-99baec775cf5

Canal row values: 7be93867-e4d2-4907-898f-da2a61c76c99

lance6716 commented 2 weeks ago

Change the field order of table A

This is done by a DDL? I think you can check if canal has captured this DDL and invalid the internal table structure. I'm not a user of canal interface, but I think it should be caused by table structure mismatch.