gtid

package
v0.0.0-...-19fc702 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckGTIDSetEmpty

func CheckGTIDSetEmpty(gSet mysql.GTIDSet) bool

CheckGTIDSetEmpty is used to check whether a GTID set is zero.

func IsZeroMariaDBGTIDSet

func IsZeroMariaDBGTIDSet(gStr string) bool

IsZeroMariaDBGTIDSet is used to meet this usage: when user wants to start binlog replication from scratch, a "uuid:0" (MySQL flavor) or "0-0-0" (mariaDB) GTID set must be written, in order to distinguish that user forgets to write it.

For MariaDB, the GTID set like "0-0-0" will confuse IsZeroGTIDSet function, so we also need to check the interval part.

func IsZeroMySQLGTIDSet

func IsZeroMySQLGTIDSet(gStr string) bool

IsZeroMySQLGTIDSet is used to meet this usage: when user wants to start binlog replication from scratch, a "uuid:0" (MySQL flavor) or "0-0-0" (mariaDB) GTID set must be written, in order to distinguish that user forgets to write it.

func MustZeroGTIDSet

func MustZeroGTIDSet(flavor string) mysql.GTIDSet

MustZeroGTIDSet is used when you can make sure the flavor is valid.

func ParserGTID

func ParserGTID(flavor, gtidStr string) (mysql.GTIDSet, error)

ParserGTID parses GTID from string. If the flavor is not specified, it will try mysql GTID first and then MariaDB GTID.

func ZeroGTIDSet

func ZeroGTIDSet(flavor string) (mysql.GTIDSet, error)

ZeroGTIDSet returns an empty GTID set. The flavor must be specified.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL