Skip to content

Commit

Permalink
解决没加-ors时程序deadlock崩溃退出的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
GoDannyLai authored Feb 13, 2019
1 parent 3f23903 commit 1841e6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion binlog_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func (this BinFileParser) MyParseReader(cfg *ConfCmd, r io.Reader, evChan chan M
} else if chRe == C_reFileEnd {
return C_reFileEnd, nil
}
if h.EventType == replication.ROWS_QUERY_EVENT {
if cfg.IfWriteOrgSql && h.EventType == replication.ROWS_QUERY_EVENT {
orgSqlEvent = e.(*replication.RowsQueryEvent)
orgSqlChan <- OrgSqlPrint{Binlog: *binlog, DateTime: h.Timestamp,
StartPos: h.LogPos - h.EventSize, StopPos: h.LogPos, QuerySql: string(orgSqlEvent.Query)}
Expand Down

0 comments on commit 1841e6f

Please sign in to comment.