package
3.0.0+incompatible
Repository: https://github.com/3pointer/tidb-tools.git
Documentation: pkg.go.dev

# README

sync-diff-inspector

sync-diff-inspector is a tool for comparing two database's data.

How to use

Usage of sync_diff_inspector:
  -L string
        log level: debug, info, warn, error, fatal (default "info")
  -V    print version of sync_diff_inspector
  -check-thread-count int
        how many goroutines are created to check data (default 1)
  -chunk-size int
        diff check chunk size (default 1000)
  -config string
        Config file
  -fix-sql-file string
        the name of the file which saves sqls used to fix different data (default "fix.sql")
  -sample int
        the percent of sampling check (default 100)
  -source-snapshot string
        source database's snapshot config
  -target-snapshot string
        target database's snapshot config

For more details you can read the config.toml.

# Functions

NewConfig creates a new config.
NewDiff returns a Diff instance.
NewReport returns a new Report.

# Constants

Fail means not all data or struct of tables are equal.
Pass means all data and struct of tables are equal.

# Structs

CheckTables saves the tables need to check.
Config is the configuration.
DBConfig is the config of database, and keep the connection.
Diff contains two sql DB, used for comparing.
Report saves the check results.
TableConfig is the config of table.
TableInstance saves the base information of table.
TableResult saves the check result for every table.