|
|
@ -14,10 +14,11 @@ import (
|
|
|
|
type TxDetail struct {
|
|
|
|
type TxDetail struct {
|
|
|
|
StartPos int
|
|
|
|
StartPos int
|
|
|
|
EndPos int
|
|
|
|
EndPos int
|
|
|
|
|
|
|
|
RowCount int
|
|
|
|
|
|
|
|
Sql string
|
|
|
|
Db string
|
|
|
|
Db string
|
|
|
|
Table string
|
|
|
|
Table string
|
|
|
|
SqlType string
|
|
|
|
SqlType string
|
|
|
|
RowCount int
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type Transaction struct {
|
|
|
|
type Transaction struct {
|
|
|
@ -27,8 +28,8 @@ type Transaction struct {
|
|
|
|
StartPos int
|
|
|
|
StartPos int
|
|
|
|
EndPos int
|
|
|
|
EndPos int
|
|
|
|
Size int
|
|
|
|
Size int
|
|
|
|
SQLOrigin string
|
|
|
|
|
|
|
|
RowsCount int
|
|
|
|
RowsCount int
|
|
|
|
|
|
|
|
SQLOrigin string
|
|
|
|
Txs []TxDetail
|
|
|
|
Txs []TxDetail
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -177,6 +178,7 @@ func parseBinlogDetail(r io.Reader, f func(Transaction)) error {
|
|
|
|
EndPos: int(h.LogPos),
|
|
|
|
EndPos: int(h.LogPos),
|
|
|
|
Db: db,
|
|
|
|
Db: db,
|
|
|
|
Table: tb,
|
|
|
|
Table: tb,
|
|
|
|
|
|
|
|
Sql: sql,
|
|
|
|
SqlType: sqlType,
|
|
|
|
SqlType: sqlType,
|
|
|
|
RowCount: int(rowCnt),
|
|
|
|
RowCount: int(rowCnt),
|
|
|
|
})
|
|
|
|
})
|
|
|
|