Skip to content

Commit

Permalink
add additional log
Browse files Browse the repository at this point in the history
  • Loading branch information
imtbkcat committed Dec 26, 2018
1 parent eae108c commit 43db3f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ type handshakeResponse41 struct {
func parseOldHandshakeResponseHeader(packet *handshakeResponse41, data []byte) (parsedBytes int, err error) {
// Ensure there are enough data to read:
// https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse320
log.Debugf("Try to parse hanshake response as Protocol::HandshakeResponse320 , packet data: %v", data)
if len(data) < 2+3 {
log.Errorf("Got malformed handshake response, packet data: %v", data)
return 0, mysql.ErrMalformPacket
Expand Down Expand Up @@ -306,7 +307,6 @@ func parseHandshakeResponseHeader(packet *handshakeResponse41, data []byte) (par
// Ensure there are enough data to read:
// http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::SSLRequest
if len(data) < 4+4+1+23 {
log.Errorf("Got malformed handshake response, packet data: %v", data)
return 0, mysql.ErrMalformPacket
}

Expand Down

0 comments on commit 43db3f5

Please sign in to comment.