版本:V6.1.0
校验数据场景:上游MySQL,下游TiDB
当遇到异常时候进程直接退出,报错如下:
[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\ngithub.com/pingcap/tidb-tools/sync_diff_inspector/utils.(*WorkerPool).
表中存在varchar主键如何配置?
在数据对比前,需要注意表中的 collation 设置。如果表的主键或唯一键为 varchar 类型,且上下游数据库中 collation 设置不同,可能会因为排序问题导致最终校验结果不正确,需要在 sync-diff-inspector 的配置文件中增加 collation 设置。
这句话没有领会懂,请求大神支持。