Skip to content

Commit 920ca9e

Browse files
authored
Merge pull request #401 from dolthub/fulghum/revert
Revert moving call to `recycleReadPacket()`
2 parents 5cc89c1 + f1072c8 commit 920ca9e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

go/mysql/conn.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,15 +1394,13 @@ func (c *Conn) handleNextCommand(ctx context.Context, handler Handler) error {
13941394

13951395
case ComBinlogDumpGTID:
13961396
ok := c.handleComBinlogDumpGTID(handler, data)
1397-
c.recycleReadPacket()
13981397
if !ok {
13991398
return fmt.Errorf("error handling ComBinlogDumpGTID packet")
14001399
}
14011400
return nil
14021401

14031402
case ComRegisterReplica:
14041403
ok := c.handleComRegisterReplica(handler, data)
1405-
c.recycleReadPacket()
14061404
if !ok {
14071405
return fmt.Errorf("error handling ComRegisterReplica packet")
14081406
}
@@ -1433,6 +1431,8 @@ func (c *Conn) handleComRegisterReplica(handler Handler, data []byte) (kontinue
14331431
return false
14341432
}
14351433

1434+
c.recycleReadPacket()
1435+
14361436
if err := binlogReplicaHandler.ComRegisterReplica(c, replicaHost, replicaPort, replicaUser, replicaPassword); err != nil {
14371437
c.writeErrorPacketFromError(err)
14381438
return false
@@ -1467,6 +1467,8 @@ func (c *Conn) handleComBinlogDumpGTID(handler Handler, data []byte) (kontinue b
14671467
return false
14681468
}
14691469

1470+
c.recycleReadPacket()
1471+
14701472
if err := binlogReplicaHandler.ComBinlogDumpGTID(c, logFile, logPos, position.GTIDSet); err != nil {
14711473
log.Error(err.Error())
14721474
c.writeErrorPacketFromError(err)

0 commit comments

Comments
 (0)