From b7ecc2d268528f80f5ee49b37593f88541318a26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Fri, 9 Sep 2022 22:44:50 +0200 Subject: [PATCH] Fix multiplexing not being disable by cached stmt during 'STMT_EXECUTE' This forces the re-evaluation of the query digest for each 'STMT_EXECUTE' for impossing the required flags over the current backend 'MySQL_Connection'. --- lib/MySQL_Session.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/MySQL_Session.cpp b/lib/MySQL_Session.cpp index 582e02554..e731bee70 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -7181,7 +7181,14 @@ void MySQL_Session::LogQuery(MySQL_Data_Stream *myds) { // this should become the place to hook other functions void MySQL_Session::RequestEnd(MySQL_Data_Stream *myds) { // check if multiplexing needs to be disabled - char *qdt=CurrentQuery.get_digest_text(); + char *qdt = NULL; + + if (status != PROCESSING_STMT_EXECUTE) { + qdt = CurrentQuery.get_digest_text(); + } else { + qdt = CurrentQuery.stmt_info->digest_text; + } + if (qdt && myds && myds->myconn) { myds->myconn->ProcessQueryAndSetStatusFlags(qdt); }