Documentation ¶
Overview ¶
Package rebuild binlog event rebuild library functions
Index ¶
- Variables
- func BuildValues(event *replication.RowsEvent) [][]string
- func CreateDatabaseRollback(stmt *ast.CreateDatabaseStmt)
- func CreateIndexRollback(stmt *ast.CreateIndexStmt)
- func CreateTableRollback(stmt *ast.CreateTableStmt)
- func CreateViewRollback(stmt *ast.CreateViewStmt)
- func DeleteLua(event *replication.BinlogEvent)
- func DeleteQuery(event *replication.BinlogEvent)
- func DeleteRebuild(event *replication.BinlogEvent) string
- func DeleteRollbackQuery(event *replication.BinlogEvent)
- func DeleteStat(event *replication.BinlogEvent)
- func EventHeaderRebuild(event *replication.BinlogEvent)
- func GTIDRebuild(event *replication.GTIDEvent)
- func InsertLua(event *replication.BinlogEvent)
- func InsertQuery(event *replication.BinlogEvent)
- func InsertRebuild(event *replication.BinlogEvent) string
- func InsertRollbackQuery(event *replication.BinlogEvent)
- func InsertStat(event *replication.BinlogEvent)
- func LastStatus()
- func LoadLuaScript()
- func LoadSchemaInfo()
- func LuaMapStringList(name string, values map[string][]string)
- func LuaStringList(name string, values []string)
- func QueryFormat(sql string)
- func QueryLua(sql string)
- func QueryRebuild(queryEvent *replication.BinlogEvent) string
- func QueryRollback(sql string)
- func QueryStat(sql string)
- func RowEventTable(event *replication.BinlogEvent) string
- func RowsQueryRebuild(rowsQueryEvent *replication.BinlogEvent) string
- func TiParse(sql, charset, collation string) ([]ast.StmtNode, error)
- func UpdateLua(event *replication.BinlogEvent)
- func UpdateQuery(event *replication.BinlogEvent)
- func UpdateRebuild(event *replication.BinlogEvent) string
- func UpdateRollbackQuery(event *replication.BinlogEvent)
- func UpdateStat(event *replication.BinlogEvent)
- func XidRebuild(event *replication.BinlogEvent) string
- type Stats
Constants ¶
This section is empty.
Variables ¶
var Columns map[string][]string
Columns ...
var InsertValuesMerge []string
InsertValuesMerge INSERT values merge
var Lua *lua.LState
Lua ...
var MaxTransactionSize float64
MaxTransactionSize ...
var MaxTransactionSizeStartPos float64
MaxTransactionSizeStartPos ..
var MaxTransactionTime float64
MaxTransactionTime ...
var MaxTransactionTimeStartPos float64
MaxTransactionTimeStartPos ...
var MaxTransactionTimeStopPos float64
MaxTransactionTimeStopPos ...
var PrimaryKeys map[string][]string
PrimaryKeys ...
var QueryStats map[string]int64
QueryStats ...
var RowsStats map[string]map[string]int64
RowsStats
var Schemas map[string]*ast.CreateTableStmt
Schemas ...
var TableStats map[string]map[string]int64
for -plugin stat TableStats
var TransactionSizeStats []float64
TransactionSizeStats ...
var TransactionStartPos float64
TransactionStartPos ...
var TransactionStartTimeStamp float64
TransactionStartTimeStamp ...
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 DeleteQuery ¶
func DeleteQuery(event *replication.BinlogEvent)
DeleteQuery build original delete SQL
func DeleteRollbackQuery ¶
func DeleteRollbackQuery(event *replication.BinlogEvent)
DeleteRollbackQuery build rollback insert SQL
func EventHeaderRebuild ¶
func EventHeaderRebuild(event *replication.BinlogEvent)
EventHeaderRebuild ...
func InsertRollbackQuery ¶
func InsertRollbackQuery(event *replication.BinlogEvent)
InsertRollbackQuery ...
func LuaMapStringList ¶
LuaMapStringList ...
func QueryRebuild ¶
func QueryRebuild(queryEvent *replication.BinlogEvent) string
QueryRebuild rebuild sql, need pingcap/parser
func QueryRollback ¶
func QueryRollback(sql string)
func RowsQueryRebuild ¶
func RowsQueryRebuild(rowsQueryEvent *replication.BinlogEvent) string
RowsQueryRebuild ...
func UpdateRollbackQuery ¶
func UpdateRollbackQuery(event *replication.BinlogEvent)
UpdateRollbackQuery ...
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 ...