Skip to content

sync_diff_inspector: AnalyzeValuesFromBuckets did not consider stats_buckets statistics contains null values #883

Description

@haiying-gao

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

The case where the upper bound of the stats_buckets statistics contains null values ​​has not been considered.

which cause sync_diff_inspector report error

[2026/01/29 00:30:35.728 +08:00] [ERROR] [common.go:607] ["analyze values from buckets"] [column=InfoPublDate] [value=NULL] [error="strconv.ParseUint: parsing \"NULL\": invalid syntax"]        [stack="github.com/pingcap/tidb-tools/pkg/dbutil.AnalyzeValuesFromBuckets\n\t/workspace/source/tidb-tools/pkg/dbutil/common.go:607\ngithub.com/pingcap/tidb-tools/sync_diff_inspector/sp       litter.(*BucketIterator).produceChunks\n\t/workspace/source/tidb-tools/sync_diff_inspector/splitter/bucket.go:304"]
  1. What did you expect to see?

sync_diff_inspector running whitout error.

  1. What did you see instead?
[2026/01/29 00:30:35.728 +08:00] [ERROR] [common.go:607] ["analyze values from buckets"] [column=InfoPublDate] [value=NULL] [error="strconv.ParseUint: parsing \"NULL\": invalid syntax"]        [stack="github.com/pingcap/tidb-tools/pkg/dbutil.AnalyzeValuesFromBuckets\n\t/workspace/source/tidb-tools/pkg/dbutil/common.go:607\ngithub.com/pingcap/tidb-tools/sync_diff_inspector/sp       litter.(*BucketIterator).produceChunks\n\t/workspace/source/tidb-tools/sync_diff_inspector/splitter/bucket.go:304"]
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?

tidb: v7.5.7

  1. which tool are you using?

synddiff: v8.5.2-2-g1cf55fb

  1. what versionof tool are you using (pump -V or tidb-lightning -V or syncer -V)?

synddiff: v8.5.2-2-g1cf55fb

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions