From 3f17a23d6fe777a4fb5c50e54a8ea43b074a7003 Mon Sep 17 00:00:00 2001 From: zhangxiaoxiao6 Date: Tue, 20 Oct 2020 19:14:09 +0800 Subject: [PATCH] handle fieldlsit packet from mysql --- backend/direct_connection.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/backend/direct_connection.go b/backend/direct_connection.go index 8dadfa7c..858d7ae0 100644 --- a/backend/direct_connection.go +++ b/backend/direct_connection.go @@ -529,20 +529,11 @@ func (dc *DirectConnection) FieldList(table string, wildcard string) ([]*mysql.F if err := dc.writeComFieldList(table, wildcard); err != nil { return nil, err } - - data, err := dc.readPacket() - if err != nil { - return nil, err - } - fs := make([]*mysql.Field, 0, 4) var f *mysql.Field - if data[0] == mysql.ErrHeader { - return nil, dc.handleErrorPacket(data) - } - for { - if data, err = dc.readPacket(); err != nil { + data, err := dc.readPacket() + if err != nil { return nil, err }