Skip to content

Commit

Permalink
Merge pull request #7713 from planetscale/prepare-resp-packets
Browse files Browse the repository at this point in the history
COM_PREPARE - Single TCP response packet with all MySQL Packets
  • Loading branch information
harshit-gangal authored Mar 19, 2021
2 parents 289d44b + a55523d commit ef31a7a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion go/mysql/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,15 @@ func (c *Conn) handleComStmtExecute(handler Handler, data []byte) (kontinue bool
return true
}

func (c *Conn) handleComPrepare(handler Handler, data []byte) bool {
func (c *Conn) handleComPrepare(handler Handler, data []byte) (kontinue bool) {
c.startWriterBuffering()
defer func() {
if err := c.endWriterBuffering(); err != nil {
log.Errorf("conn %v: flush() failed: %v", c.ID(), err)
kontinue = false
}
}()

query := c.parseComPrepare(data)
c.recycleReadPacket()

Expand Down

0 comments on commit ef31a7a

Please sign in to comment.