From 8e5f0ff5287e94c1cbb1e51ac51206ccefa552a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Thu, 14 May 2020 20:45:01 +0200 Subject: [PATCH] Fixes #1493: Update 'pkt_sid' in case of compressed connection --- lib/mysql_data_stream.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/mysql_data_stream.cpp b/lib/mysql_data_stream.cpp index 7b26faf62..f8f1a5531 100644 --- a/lib/mysql_data_stream.cpp +++ b/lib/mysql_data_stream.cpp @@ -880,6 +880,7 @@ int MySQL_Data_Stream::buffer2array() { proxy_debug(PROXY_DEBUG_PKT_ARRAY, 5, "Session=%p . Reading the header of a new compressed packet\n", sess); memcpy(&queueIN.hdr,queue_r_ptr(queueIN), sizeof(mysql_hdr)); queue_r(queueIN,sizeof(mysql_hdr)); + pkt_sid=queueIN.hdr.pkt_id; queueIN.pkt.size=queueIN.hdr.pkt_length+sizeof(mysql_hdr)+3; queueIN.pkt.ptr=l_alloc(queueIN.pkt.size); memcpy(queueIN.pkt.ptr, &queueIN.hdr, sizeof(mysql_hdr)); // immediately copy the header into the packet