From 65ca6a4be87f3e0f2f55451b3c0a6cb34b8cd6e3 Mon Sep 17 00:00:00 2001 From: MassimilianoPinto Date: Thu, 22 Dec 2016 17:03:57 +0100 Subject: [PATCH] MaxRows: 0x0 detection in handle_rows() removed The 0x0 detection handle_rows was added for MULTI result detection, now moved in handle_expecting_response. Additionally 0x0 conflicts with empty string data. CLIENT_DEPRECATE_EOF is not supported right now --- server/modules/filter/maxrows/maxrows.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/server/modules/filter/maxrows/maxrows.c b/server/modules/filter/maxrows/maxrows.c index 2523c9586..b1e53ef50 100644 --- a/server/modules/filter/maxrows/maxrows.c +++ b/server/modules/filter/maxrows/maxrows.c @@ -757,15 +757,16 @@ static int handle_rows(MAXROWS_SESSION_DATA *csdata) break; - case 0x0: // OK packet after the rows. - /* OK could the last packet in the Multi-Resultset transmission: - * handle DISCARD or send all the data. - * - * It could also be sent instead of EOF from as in MySQL 5.7.5 - * if client sends CLIENT_DEPRECATE_EOF capability OK packet could - * have the SERVER_MORE_RESULTS_EXIST flag. - * Note: Flags in the OK packet are at the same offset as in EOF. - */ + /* OK could the last packet in the Multi-Resultset transmission: + * this is handled by handle_expecting_response() + * + * It could also be sent instead of EOF from as in MySQL 5.7.5 + * if client sends CLIENT_DEPRECATE_EOF capability OK packet could + * have the SERVER_MORE_RESULTS_EXIST flag. + * Flags in the OK packet are at the same offset as in EOF. + * + * NOTE: not supported right now + */ case 0xfe: // EOF, the one after the rows. csdata->res.offset += packetlen; ss_dassert(csdata->res.offset == buflen);