Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: TIDB5.2.1 通过cdc增量同步到TiDB 6.1.0后无法更新唯一键
[TiDB Usage Environment] Incremental Data Migration in Production Environment
[TiDB Version] From v5.2.1 to v6.1.0
[Reproduction Steps]
Follow the official steps:
- Create an S3 bucket
- Stop GC
- Backup tables from TiDB 5.2.1 to S3
- Restore data to TiDB v6.1.2
- Incremental synchronization using ticdc (latest version)
- Enable GC
[Encountered Issues: Symptoms and Impact]
The unique key of the table in TiDB v6.1.2 cannot be updated and cannot be used as a query condition
[Resource Configuration]
mysql> select * from sys_user where emp_id=“w123456”;
Empty set (0.00 sec)
mysql> select * from sys_user where user_name=“demo”;
id | emp_id | user_name
| 1 | w123456 | demo
mysql> desc sys_user;
±----------------±--------------------±-----±-----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±----------------±--------------------±-----±-----±--------±---------------+
| id | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
| emp_id | varchar(60) | NO | UNI | | |
| user_name | varchar(60) | NO | | | |
| mobile | varchar(20) | NO | | | |