From 4b3c9eeb2ac69792a250bbc9e775bf5ef41c8446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Sat, 27 Jul 2019 01:38:08 +1000 Subject: [PATCH] Partial revert of previous commit --- lib/MySQL_Session.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/MySQL_Session.cpp b/lib/MySQL_Session.cpp index 8f65905f6..73ed6ee6a 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -3366,20 +3366,20 @@ handler_again: if (handler_again___verify_backend_time_zone()) { goto handler_again; } - if (status==PROCESSING_STMT_EXECUTE) { - CurrentQuery.mysql_stmt=myconn->local_stmts->find_backend_stmt_by_global_id(CurrentQuery.stmt_global_id); - if (CurrentQuery.mysql_stmt==NULL) { - MySQL_STMT_Global_info *stmt_info=NULL; - // the connection we too doesn't have the prepared statements prepared - // we try to create it now - stmt_info=GloMyStmt->find_prepared_statement_by_stmt_id(CurrentQuery.stmt_global_id); - CurrentQuery.QueryLength=stmt_info->query_length; - CurrentQuery.QueryPointer=(unsigned char *)stmt_info->query; - previous_status.push(PROCESSING_STMT_EXECUTE); - NEXT_IMMEDIATE(PROCESSING_STMT_PREPARE); - if (CurrentQuery.stmt_global_id!=stmt_info->statement_id) { - PROXY_TRACE(); - } + } + if (status==PROCESSING_STMT_EXECUTE) { + CurrentQuery.mysql_stmt=myconn->local_stmts->find_backend_stmt_by_global_id(CurrentQuery.stmt_global_id); + if (CurrentQuery.mysql_stmt==NULL) { + MySQL_STMT_Global_info *stmt_info=NULL; + // the connection we too doesn't have the prepared statements prepared + // we try to create it now + stmt_info=GloMyStmt->find_prepared_statement_by_stmt_id(CurrentQuery.stmt_global_id); + CurrentQuery.QueryLength=stmt_info->query_length; + CurrentQuery.QueryPointer=(unsigned char *)stmt_info->query; + previous_status.push(PROCESSING_STMT_EXECUTE); + NEXT_IMMEDIATE(PROCESSING_STMT_PREPARE); + if (CurrentQuery.stmt_global_id!=stmt_info->statement_id) { + PROXY_TRACE(); } } }