sync_diff_inspector是否支持tidb作为上游库校验迁移到其他数据库的数据?

【 TiDB 版本】
tidb 4.0.14 & sync_diff_inspector v5.3.1-2-g563c2a3
【遇到的问题】
设置tidb中的某张表作为上游表去校验下游某张表的数据,报错 set case unsensitive failed,日志如下:

我的配置:

我的疑问是:route rules是否配置错误还是我需要修改tidb的配置?

1 个赞

您好:
下游是什么数据库?mysql 及其他发行版都可以的。
另外看到rules中上下游库表名一致,可以不用写rules。

下游是内部正在测试的兼容mysql协议的数据库,报错目测看起来和下游没啥关系;

不写rules会报找不到匹配的表的错误:

[2022/04/13 11:15:47.600 +08:00] [FATAL] [main.go:120] [“failed to initialize diff process”] [error="from upstream: please make sure the filter is correct.: the source has no table to be compared. target-table is gifshow`.`core_pay"] [errorVerbose=“the source has no table to be compared. target-table is gifshow`.`core_pay\ngithub.com/pingcap/tidb-tools/sync_diff_inspector/source.checkTableMatched\ \t/home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/source/source.go:302\ github.com/pingcap/tidb-tools/sync_diff_inspector/source.getSourceTableMap\ \t/home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/source/tidb.go:251\ github.com/pingcap/tidb-tools/sync_diff_inspector/source.NewTiDBSource\ \t/home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/source/tidb.go:258\ github.com/pingcap/tidb-tools/sync_diff_inspector/source.buildSourceFromCfg\ \t/home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/source/source.go:181\ github.com/pingcap/tidb-tools/sync_diff_inspector/source.NewSources\ \t/home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/source/source.go:159\ main.(*Diff).init\ \t/home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/diff.go:139\ main.NewDiff\ \t/home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/diff.go:97\ main.checkSyncState\ \t/home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/main.go:117\ main.main\ \t/home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/main.go:104\ runtime.main\ \t/usr/local/go/src/runtime/proc.go:225\ runtime.goexit\ \t/usr/local/go/src/runtime/asm_amd64.s:1371\ please make sure the filter is correct.\ from upstream”] [stack=“main.checkSyncState\ \t/home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/main.go:120\ main.main\ \t/home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/main.go:104\ runtime.main\ \t/usr/local/go/src/runtime/proc.go:225”]

另外有个疑问是:如果下游的表和上游表相比少几个索引,但是表名库名均相同,这种情况下sync_diff_inspector会将这两个表匹配起来吗?

下游支持 `db`.`table` 这种扩起来的写法吗?反引号扩起来的

在下游试一下 select 1 from `gifshow`.`core_pay` 看能不能查出来

该主题在最后一个回复创建后60天后自动关闭。不再允许新的回复。