添加查询结果信息

This commit is contained in:
xiaobiao
2022-04-27 14:26:44 +08:00
parent b705210cdb
commit 857f74990b
3 changed files with 67 additions and 47 deletions

View File

@@ -121,10 +121,14 @@ func parseLengthEncodedInt(b []byte) (num uint64, isNull bool, n int) {
return
}
func extractMysqlPayloadSize(header []byte) int {
func parseInt2(header []byte) int {
return int(uint32(header[0]) | uint32(header[1])<<8)
}
func parseInt3(header []byte) int {
return int(uint32(header[0]) | uint32(header[1])<<8 | uint32(header[2])<<16)
}
func bytesToInt(contents []byte) int {
func parseInt4(contents []byte) int {
return int(uint32(contents[0]) | uint32(contents[1])<<8 | uint32(contents[2])<<16 | uint32(contents[3])<<24)
}
}