Skip to content

Commit

Permalink
handle fieldlsit packet from mysql (XiaoMi#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
chicliz authored Oct 20, 2020
1 parent fdbf977 commit 409b519
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions backend/direct_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 409b519

Please sign in to comment.