diff --git a/lib/MySQL_Session.cpp b/lib/MySQL_Session.cpp index ffe65f51d..3abe7598c 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -4345,11 +4345,6 @@ handler_again: handler_rc0_Process_GTID(myconn); - // check if multiplexing needs to be disabled - char *qdt=CurrentQuery.get_digest_text(); - if (qdt) - myconn->ProcessQueryAndSetStatusFlags(qdt); - if (mirror == false) { // Support for LAST_INSERT_ID() if (myconn->mysql->insert_id) { @@ -6557,6 +6552,11 @@ void MySQL_Session::LogQuery(MySQL_Data_Stream *myds) { // this should execute most of the commands executed when a request is finalized // 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(); + if (qdt && myds && myds->myconn) { + myds->myconn->ProcessQueryAndSetStatusFlags(qdt); + } switch (status) { case PROCESSING_STMT_EXECUTE: