Record new_collation setting in br backup and compare new_collation during restore #33422
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
- do br backup of a tidb cluster with new_collation disabled
- restore the backup to a cluster with new_collation enabled
2. What did you expect to see? (Required)
- Restore should check new_collation compatibility and fail directly if new_collation setting of target cluster is different from that in the backup.
To archive this, we need to:
a. During br backup, we can record new_collation setting of the tidb cluster.
b. When we restore to a target cluster, br can compare new_collation setting of the target cluster with that in the backup, and prevent user from restore if they are not the same.
3. What did you see instead (Required)
Currently br restored data may have checksum and index error if source tidb and target tidb has different new_collation settings, and we reply on user to make sure they are the same, which is not user friendly.
4. What is your TiDB version? (Required)
BR 6.0.0
Activity