diff --git a/replication/binlogsyncer.go b/replication/binlogsyncer.go index ae80651e3..8e44c7644 100644 --- a/replication/binlogsyncer.go +++ b/replication/binlogsyncer.go @@ -163,8 +163,7 @@ func (b *BinlogSyncer) writeBinglogDumpCommand(p Position) error { binary.LittleEndian.PutUint32(data[pos:], p.Pos) pos += 4 - //only support 0x01 BINGLOG_DUMP_NON_BLOCK - binary.LittleEndian.PutUint16(data[pos:], BINLOG_DUMP_NON_BLOCK) + binary.LittleEndian.PutUint16(data[pos:], BINLOG_DUMP_NEVER_STOP) pos += 2 binary.LittleEndian.PutUint32(data[pos:], b.serverID) diff --git a/replication/const.go b/replication/const.go index 74f9b8dc3..a806a751e 100644 --- a/replication/const.go +++ b/replication/const.go @@ -24,6 +24,7 @@ const ( ) const ( + BINLOG_DUMP_NEVER_STOP uint16 = 0x00 BINLOG_DUMP_NON_BLOCK uint16 = 0x01 BINLOG_THROUGH_POSITION uint16 = 0x02 BINLOG_THROUGH_GTID uint16 = 0x04