rebuild

package
v0.0.0-...-24a3270 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package rebuild binlog event rebuild library functions

Index

Constants

This section is empty.

Variables

View Source
var Columns map[string][]string

Columns ...

View Source
var InsertValuesMerge []string

InsertValuesMerge INSERT values merge

Lua ...

View Source
var MaxTransactionSize float64

MaxTransactionSize ...

View Source
var MaxTransactionSizeStartPos float64

MaxTransactionSizeStartPos ..

View Source
var MaxTransactionTime float64

MaxTransactionTime ...

View Source
var MaxTransactionTimeStartPos float64

MaxTransactionTimeStartPos ...

View Source
var MaxTransactionTimeStopPos float64

MaxTransactionTimeStopPos ...

View Source
var PrimaryKeys map[string][]string

PrimaryKeys ...

View Source
var QueryStats map[string]int64

QueryStats ...

View Source
var RowsStats map[string]map[string]int64

RowsStats

Schemas ...

View Source
var TableStats map[string]map[string]int64

for -plugin stat TableStats

View Source
var TransactionSizeStats []float64

TransactionSizeStats ...

View Source
var TransactionStartPos float64

TransactionStartPos ...

View Source
var TransactionStartTimeStamp float64

TransactionStartTimeStamp ...

View Source
var TransactionTimeStats []float64

TransactionTimeStats ...

Functions

func BuildValues

func BuildValues(event *replication.RowsEvent) [][]string

BuildValues build values list

func CreateDatabaseRollback

func CreateDatabaseRollback(stmt *ast.CreateDatabaseStmt)

CreateDatabaseRollback ...

func CreateIndexRollback

func CreateIndexRollback(stmt *ast.CreateIndexStmt)

CreateIndexRollback ...

func CreateTableRollback

func CreateTableRollback(stmt *ast.CreateTableStmt)

CreateTableRollback ...

func CreateViewRollback

func CreateViewRollback(stmt *ast.CreateViewStmt)

CreateViewRollback ...

func DeleteLua

func DeleteLua(event *replication.BinlogEvent)

DeleteLua ...

func DeleteQuery

func DeleteQuery(event *replication.BinlogEvent)

DeleteQuery build original delete SQL

func DeleteRebuild

func DeleteRebuild(event *replication.BinlogEvent) string

DeleteRebuild ...

func DeleteRollbackQuery

func DeleteRollbackQuery(event *replication.BinlogEvent)

DeleteRollbackQuery build rollback insert SQL

func DeleteStat

func DeleteStat(event *replication.BinlogEvent)

DeleteStat ...

func EventHeaderRebuild

func EventHeaderRebuild(event *replication.BinlogEvent)

EventHeaderRebuild ...

func GTIDRebuild

func GTIDRebuild(event *replication.GTIDEvent)

GTIDRebuild ...

func InsertLua

func InsertLua(event *replication.BinlogEvent)

InsertLua ...

func InsertQuery

func InsertQuery(event *replication.BinlogEvent)

InsertQuery ...

func InsertRebuild

func InsertRebuild(event *replication.BinlogEvent) string

InsertRebuild ...

func InsertRollbackQuery

func InsertRollbackQuery(event *replication.BinlogEvent)

InsertRollbackQuery ...

func InsertStat

func InsertStat(event *replication.BinlogEvent)

InsertStat ...

func LastStatus

func LastStatus()

LastStatus ...

func LoadLuaScript

func LoadLuaScript()

LoadLuaScript ...

func LoadSchemaInfo

func LoadSchemaInfo()

LoadSchemaInfo load schema info from file or mysql

func LuaMapStringList

func LuaMapStringList(name string, values map[string][]string)

LuaMapStringList ...

func LuaStringList

func LuaStringList(name string, values []string)

LuaStringList ...

func QueryFormat

func QueryFormat(sql string)

QueryFormat ...

func QueryLua

func QueryLua(sql string)

QueryLua ...

func QueryRebuild

func QueryRebuild(queryEvent *replication.BinlogEvent) string

QueryRebuild rebuild sql, need pingcap/parser

func QueryRollback

func QueryRollback(sql string)

func QueryStat

func QueryStat(sql string)

QueryStat ...

func RowEventTable

func RowEventTable(event *replication.BinlogEvent) string

RowEventTable ...

func RowsQueryRebuild

func RowsQueryRebuild(rowsQueryEvent *replication.BinlogEvent) string

RowsQueryRebuild ...

func TiParse

func TiParse(sql, charset, collation string) ([]ast.StmtNode, error)

TiParse TiDB 语法解析

func UpdateLua

func UpdateLua(event *replication.BinlogEvent)

UpdateLua ...

func UpdateQuery

func UpdateQuery(event *replication.BinlogEvent)

UpdateQuery ...

func UpdateRebuild

func UpdateRebuild(event *replication.BinlogEvent) string

UpdateRebuild ...

func UpdateRollbackQuery

func UpdateRollbackQuery(event *replication.BinlogEvent)

UpdateRollbackQuery ...

func UpdateStat

func UpdateStat(event *replication.BinlogEvent)

UpdateStat ...

func XidRebuild

func XidRebuild(event *replication.BinlogEvent) string

XidRebuild ...

Types

type Stats

type Stats struct {
	Table           map[string]map[string]int64  `json:"TableStats"`
	Rows            map[string]map[string]int64  `json:"RowsStats"`
	Query           map[string]int64             `json:"QueryStats"`
	Transaction     map[string]map[string]string `json:"TransactionStats"`
	TransactionSize []float64                    `json:"-"` // take from end_log_pos between begin and commit
	TransactionTime []float64                    `json:"-"` // take from timestamp between begin and commit
}
var BinlogStats Stats

BinlogStats ...

Jump to

Keyboard shortcuts

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