Skip to content

Commit

Permalink
fix when show tables record too much error log "Got unhandled packet.."
Browse files Browse the repository at this point in the history
Signed-off-by: JohnnyThree <whereshallyoube@gmail.com>
  • Loading branch information
inolddays committed Jul 15, 2021
1 parent 1d649ea commit 4f5ce54
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions go/mysql/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,11 @@ func (c *Conn) handleNextCommand(handler Handler) bool {
case ComResetConnection:
c.handleComResetConnection(handler)
return true
case ComFieldList:
c.recycleReadPacket()
if !c.writeErrorAndLog(ERUnknownComError, SSNetError, "command handling not implemented yet: %v", data[0]) {
return false
}

default:
log.Errorf("Got unhandled packet (default) from %s, returning error: %v", c, data)
Expand Down
3 changes: 3 additions & 0 deletions go/mysql/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ const (
// ComQuery is COM_QUERY.
ComQuery = 0x03

// ComFieldList is COM_Field_List.
ComFieldList = 0x04

// ComPing is COM_PING.
ComPing = 0x0e

Expand Down

0 comments on commit 4f5ce54

Please sign in to comment.