Skip to content

Commit 7f69a58

Browse files
author
Andrey Perepechaev
committed
add blocking slave replication
1 parent f231ea2 commit 7f69a58

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

replication/binlogsyncer.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ func (b *BinlogSyncer) writeBinglogDumpCommand(p Position) error {
163163
binary.LittleEndian.PutUint32(data[pos:], p.Pos)
164164
pos += 4
165165

166-
//only support 0x01 BINGLOG_DUMP_NON_BLOCK
167-
binary.LittleEndian.PutUint16(data[pos:], BINLOG_DUMP_NON_BLOCK)
166+
binary.LittleEndian.PutUint16(data[pos:], BINLOG_DUMP_NEVER_STOP)
168167
pos += 2
169168

170169
binary.LittleEndian.PutUint32(data[pos:], b.serverID)

replication/const.go

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const (
2424
)
2525

2626
const (
27+
BINLOG_DUMP_NEVER_STOP uint16 = 0x00
2728
BINLOG_DUMP_NON_BLOCK uint16 = 0x01
2829
BINLOG_THROUGH_POSITION uint16 = 0x02
2930
BINLOG_THROUGH_GTID uint16 = 0x04

0 commit comments

Comments
 (0)