MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / handleErrorPacket

Method handleErrorPacket

IceFireDB-SQLProxy/pkg/mysql/client/resp.go:71–89  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

69}
70
71func (c *Conn) handleErrorPacket(data []byte) error {
72 e := new(MyError)
73
74 pos := 1
75
76 e.Code = binary.LittleEndian.Uint16(data[pos:])
77 pos += 2
78
79 if c.capability&CLIENT_PROTOCOL_41 > 0 {
80 // skip '#'
81 pos++
82 e.State = hack.String(data[pos : pos+5])
83 pos += 5
84 }
85
86 e.Message = hack.String(data[pos:])
87
88 return e
89}
90
91func (c *Conn) handleAuthResult() error {
92 data, switchToPlugin, err := c.readAuthResult()

Callers 10

readAuthResultMethod · 0.95
readOKMethod · 0.95
readResultMethod · 0.95
readResultStreamingMethod · 0.95
readResultRowsMethod · 0.95
FieldListMethod · 0.95
HandleErrorPacketMethod · 0.95
readInitialHandshakeMethod · 0.95
PrepareMethod · 0.95

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected