package
5.0.1+incompatible
Repository: https://github.com/cartersz/tidb-tools.git
Documentation: pkg.go.dev

# README

Check library

check is a library to define some checkers to check configurations of system.

It is mainly used for configuration checking of data synchronization between database systems.

Introduction

MySQL slave privilege Checker

In MySQL data synchronization, REPLICATION SLAVE and REPLICATION CLIENT are required, RELOAD is strongly suggested to have.

MySQL Version Checker

Syncer only supports 5.5 <= version <= 8.0 now

MySQL Server ID Checker

MySQL Server(master) should have server ID in master-slave replications.

MySQL Binlog Enable Checker

MySQL Server(master) should enable binlog in master-slave replication.

MySQL Binlog Format Checker

Syncer only supports ROW binlog format

MySQL Binlog Row Image Checker

binlog_row_image is introduced since mysql 5.6.2, and mariadb 10.1.6. In MySQL 5.5 and earlier, full row images are always used for both before images and after images.

ref:

# Functions

Do executes several checkers.
IsMariaDB tells whether the version is from mariadb.
NewMySQLBinlogEnableChecker returns a Checker.
NewMySQLBinlogFormatChecker returns a Checker.
NewMySQLBinlogRowImageChecker returns a Checker.
NewMySQLServerIDChecker returns a Checker.
NewMySQLVersionChecker returns a Checker.
NewShardingTablesCheck returns a Checker.
NewSourceDumpPrivilegeChecker returns a Checker.
NewSourceReplicationPrivilegeChecker returns a Checker.
NewTablesChecker returns a Checker.

# Constants

AutoIncrementKeyChecking is an identification for auto increment key checking.
StateFailure indicates that the check was failed.
StateSuccess indicates that the check was successful.
StateWarning indicates that the check had warnings.

# Variables

MaxVersion define a maximum version.
MinVersion define a mininum version.
SupportedVersion defines the MySQL/MariaDB version that DM/syncer supports * 5.6.0 <= MySQL Version * 10.1.2 <= Mariadb Version.

# Structs

MySQLBinlogEnableChecker checks whether `log_bin` variable is enabled in MySQL.
MySQLBinlogFormatChecker checks mysql binlog_format.
MySQLBinlogRowImageChecker checks mysql binlog_row_image.
MySQLServerIDChecker checks mysql/mariadb server ID.
MySQLVersionChecker checks mysql/mariadb/rds,..
Result is result of check.
Results contains all check results and summary.
ResultSummary is summary of all check results.
ShardingTablesCheck checks consistency of table structures of one sharding group * check whether they have same column list * check whether they have auto_increment key.
SourceDumpPrivilegeChecker checks dump privileges of source DB.
SourceReplicatePrivilegeChecker checks replication privileges of source DB.
TablesChecker checks compatibility of table structures, there are differences between MySQL and TiDB.

# Interfaces

Checker is interface that defines checker to check configurations of system.

# Type aliases

MySQLVersion represents MySQL version number.
State is state of check.