From 6b9906befaf26c937f6452e1dc02b2cf6aaa2e97 Mon Sep 17 00:00:00 2001 From: Anantha Kumaran Date: Fri, 8 Sep 2017 16:16:33 +0530 Subject: [PATCH] initialize the filler byte to 0 ``` COM_STMT_PREPARE OK OK response to a COM_STMT_PREPARE packet direction: server -> client payload: 1 [00] OK 4 statement-id 2 num-columns 2 num-params 1 [00] filler 2 warning count ``` According to the protocol 10th byte (filler) of the response should be 0. introduced by 02432b2b2734473654e5fe8055d6b623a42be4f2. --- lib/MySQL_Protocol.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/MySQL_Protocol.cpp b/lib/MySQL_Protocol.cpp index e5356c5b44..9caa018f3a 100644 --- a/lib/MySQL_Protocol.cpp +++ b/lib/MySQL_Protocol.cpp @@ -704,6 +704,7 @@ bool MySQL_Protocol::generate_STMT_PREPARE_RESPONSE(uint8_t sequence_id, MySQL_S hdr.pkt_length=12; memcpy(okpack,&hdr,sizeof(mysql_hdr)); // copy header okpack[4]=0; + okpack[13]=0; okpack[15]=0; if (_stmt_id) { memcpy(okpack+5,&_stmt_id,sizeof(uint32_t));