From 0832d3f72145986c899bb99b2c0a8723c1f3f4a6 Mon Sep 17 00:00:00 2001 From: Maeda Atsushi Date: Mon, 16 Mar 2020 21:31:55 +0900 Subject: [PATCH] fix affected rows conversoin bug when the number of row is large see also https://dev.mysql.com/doc/internals/en/integer.html#packet-Protocol::LengthEncodedInteger https://dev.mysql.com/doc/internals/en/packet-OK_Packet.html --- plugSrc/mysql/build/entry.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugSrc/mysql/build/entry.go b/plugSrc/mysql/build/entry.go index 4a1ba39..3859fd6 100644 --- a/plugSrc/mysql/build/entry.go +++ b/plugSrc/mysql/build/entry.go @@ -232,7 +232,7 @@ func (stm *stream) resolveServerPacket(payload []byte, seq int) { case 0x00: var pos = 1 - l,_ := LengthBinary(payload[pos:]) + l,_,_ := LengthEncodedInt(payload[pos:]) affectedRows := int(l) msg += GetNowStr(false)+"%s Effect Row:%s"