Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: sync-diff-inspector校验数据异常退出
Version: V6.1.0
Data verification scenario: upstream MySQL, downstream TiDB
When an exception occurs, the process exits directly with the following error:
[2022/09/05 15:22:41.234 +08:00] [ERROR] [utils.go:681] [“there is no row in result set”] [stack="github.com/pingcap/tidb-tools/sync_diff_inspector/utils.GetApproximateMidBySize
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/utils/utils.go:681
main.(*Diff).binSearch
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/diff.go:512
main.(*Diff).BinGenerate
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/diff.go:496
main.(*Diff).consume
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/diff.go:435
main.(*Diff).Equal.func2
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/diff.go:284
github.com/pingcap/tidb-tools/sync_diff_inspector/utils.(*WorkerPool).
How to configure if there is a varchar primary key in the table?
Before data comparison, pay attention to the collation settings in the table. If the primary key or unique key in the table is of varchar type and the collation settings in the upstream and downstream databases are different, the final verification result may be incorrect due to sorting issues. You need to add collation settings in the sync-diff-inspector configuration file.
I didn’t understand this sentence, requesting support from experts.