BUG/MINOR: checks: Properly handle truncated mysql server messages
If a message is not fully received from a mysql server, depending on last_read
value, an error must be reported or we must wait for more data. The first if
statement must not check last_read.
Partly fixes issue #600. No backport needed.
diff --git a/src/checks.c b/src/checks.c
index 774b28c..6f13200 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -1202,7 +1202,7 @@
/* 3 Bytes for the packet length and 1 byte for the sequence id */
- if (!last_read && b_data(&check->bi) < offset+4) {
+ if (b_data(&check->bi) < offset+4) {
if (!last_read)
goto wait_more_data;