<meta http-equiv="Content-Type" content="text/html; charset=GB18030"><div><font color="#4d4d4d" face="Microsoft YaHei, SF Pro Display, Roboto, Noto, Arial, PingFang SC, sans-serif"><span style="font-size: 16px;">Hello,</span></font></div><div><font color="#4d4d4d" face="Microsoft YaHei, SF Pro Display, Roboto, Noto, Arial, PingFang SC, sans-serif"><span style="font-size: 16px;"><br></span></font></div><div><font color="#4d4d4d" face="Microsoft YaHei, SF Pro Display, Roboto, Noto, Arial, PingFang SC, sans-serif"><span style="font-size: 16px;">In function&nbsp;<span style="background-color: rgb(30, 30, 30);"></span>send_complete_and_ready(),</span></font></div><div><font color="#4d4d4d" face="Microsoft YaHei, SF Pro Display, Roboto, Noto, Arial, PingFang SC, sans-serif"><span style="font-size: 16px;">I found the value of 'msg_len'&nbsp;</span></font><span style="font-size: 16px; color: rgb(77, 77, 77); font-family: &quot;Microsoft YaHei&quot;, &quot;SF Pro Display&quot;, Roboto, Noto, Arial, &quot;PingFang SC&quot;, sans-serif;">is not read </span><font color="#4d4d4d" face="Microsoft YaHei, SF Pro Display, Roboto, Noto, Arial, PingFang SC, sans-serif"><span style="font-size: 16px;">since it was assigned 15</span></font><span style="color: rgb(77, 77, 77); font-family: &quot;Microsoft YaHei&quot;, &quot;SF Pro Display&quot;, Roboto, Noto, Arial, &quot;PingFang SC&quot;, sans-serif; font-size: 16px;">.</span></div><div><span style="font-size: 16px; color: rgb(77, 77, 77); font-family: &quot;Microsoft YaHei&quot;, &quot;SF Pro Display&quot;, Roboto, Noto, Arial, &quot;PingFang SC&quot;, sans-serif;"><br></span></div><div><font color="#4d4d4d" face="Microsoft YaHei, SF Pro Display, Roboto, Noto, Arial, PingFang SC, sans-serif"><span style="font-size: 16px;">the&nbsp;</span></font><span style="font-size: 16px; color: rgb(77, 77, 77); font-family: &quot;Microsoft YaHei&quot;, &quot;SF Pro Display&quot;, Roboto, Noto, Arial, &quot;PingFang SC&quot;, sans-serif;">code is as follows</span></div><div><font color="#4d4d4d" face="Microsoft YaHei, SF Pro Display, Roboto, Noto, Arial, PingFang SC, sans-serif"><span style="font-size: 16px;">---------src/utils/pool_process_reporting.c:121</span></font><span style="font-size: 16px; color: rgb(77, 77, 77); font-family: &quot;Microsoft YaHei&quot;, &quot;SF Pro Display&quot;, Roboto, Noto, Arial, &quot;PingFang SC&quot;, sans-serif;">---------------------------</span></div><div><div>&nbsp;121&nbsp; &nbsp; &nbsp;if (num_rows &gt;= 0)</div><div>&nbsp;122&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;msg_len = snprintf(msg, 16, "%s %d", message, num_rows);</div><div>&nbsp;123&nbsp; &nbsp; &nbsp;else</div><div>&nbsp;124&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;msg_len = snprintf(msg, 16, "%s", message);</div><div>&nbsp;125</div><div>&nbsp;126&nbsp; &nbsp; &nbsp;/*</div><div>&nbsp;127&nbsp; &nbsp; &nbsp; * if we had more than 16 bytes, including '\0', the string was</div><div>&nbsp;128&nbsp; &nbsp; &nbsp; * truncatured shouldn't happen though, as it would means more than</div><div>&nbsp;129&nbsp; &nbsp; &nbsp; * "SELECT 99999999"</div><div>&nbsp;130&nbsp; &nbsp; &nbsp; */</div><div>&nbsp;131&nbsp; &nbsp; &nbsp;if (msg_len &gt; 15)</div><div>&nbsp;132&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;msg_len = 15;</div><div>&nbsp;133</div><div>&nbsp;134&nbsp; &nbsp; &nbsp;/* complete command response */</div><div>&nbsp;135&nbsp; &nbsp; &nbsp;pool_write(frontend, "C", 1);</div><div>&nbsp;136&nbsp; &nbsp; &nbsp;if (MAJOR(backend) == PROTO_MAJOR_V3)</div><div>&nbsp;137&nbsp; &nbsp; &nbsp;{</div><div>&nbsp;138&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;len = htonl(4 + strlen(msg) + 1);</div><div>&nbsp;139&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pool_write(frontend, &amp;len, sizeof(len));</div><div>&nbsp;140&nbsp; &nbsp; &nbsp;}</div><div>&nbsp;141&nbsp; &nbsp; &nbsp;pool_write(frontend, msg, strlen(msg) + 1);</div></div><div><br></div><div><font color="#4d4d4d" face="Microsoft YaHei, SF Pro Display, Roboto, Noto, Arial, PingFang SC, sans-serif"><span style="font-size: 16px;">I think 'msg_len' can replace 'strlen(msg)'&nbsp;</span></font><span style="font-size: 16px; color: rgb(77, 77, 77); font-family: &quot;Microsoft YaHei&quot;, &quot;SF Pro Display&quot;, Roboto, Noto, Arial, &quot;PingFang SC&quot;, sans-serif;">after it , and I make a patch for it.</span></div><div><br></div><div>Best regards,</div><div>sherlockcpp</div><div><br></div><div><br></div><span style="color: rgb(51, 51, 51); font-family: arial; font-size: 13px;"></span>