From 4f5ce54724c3eb840763101d79b8719de448466e Mon Sep 17 00:00:00 2001 From: JohnnyThree Date: Thu, 15 Jul 2021 11:52:18 +0800 Subject: [PATCH] fix when show tables record too much error log "Got unhandled packet.." Signed-off-by: JohnnyThree --- go/mysql/conn.go | 5 +++++ go/mysql/constants.go | 3 +++ 2 files changed, 8 insertions(+) diff --git a/go/mysql/conn.go b/go/mysql/conn.go index 599cbd80f1b..632621b4c6e 100644 --- a/go/mysql/conn.go +++ b/go/mysql/conn.go @@ -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) diff --git a/go/mysql/constants.go b/go/mysql/constants.go index 68c94d9bff3..2cc0383a9de 100644 --- a/go/mysql/constants.go +++ b/go/mysql/constants.go @@ -194,6 +194,9 @@ const ( // ComQuery is COM_QUERY. ComQuery = 0x03 + // ComFieldList is COM_Field_List. + ComFieldList = 0x04 + // ComPing is COM_PING. ComPing = 0x0e