summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/suite/plugins/t/test_sql_service.test4
-rw-r--r--sql/sql_prepare.cc6
2 files changed, 6 insertions, 4 deletions
diff --git a/mysql-test/suite/plugins/t/test_sql_service.test b/mysql-test/suite/plugins/t/test_sql_service.test
index 2ff2db2fce0..3384b523bda 100644
--- a/mysql-test/suite/plugins/t/test_sql_service.test
+++ b/mysql-test/suite/plugins/t/test_sql_service.test
@@ -1,7 +1,3 @@
-if (`SELECT $PS_PROTOCOL != 0`)
-{
- --skip Test temporarily disabled for ps-protocol
-}
--source include/not_embedded.inc
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index e7d02aaeb0d..e20bde0716c 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -6244,6 +6244,7 @@ extern "C" int execute_sql_command(const char *command,
THD *new_thd= 0;
int result;
my_bool qc_save= 0;
+ Reprepare_observer *save_reprepare_observer= nullptr;
if (!thd)
{
@@ -6264,6 +6265,8 @@ extern "C" int execute_sql_command(const char *command,
qc_save= thd->query_cache_is_applicable;
thd->query_cache_is_applicable= 0;
+ save_reprepare_observer= thd->m_reprepare_observer;
+ thd->m_reprepare_observer= nullptr;
}
sql_text.str= (char *) command;
sql_text.length= strlen(command);
@@ -6301,7 +6304,10 @@ extern "C" int execute_sql_command(const char *command,
if (new_thd)
delete new_thd;
else
+ {
thd->query_cache_is_applicable= qc_save;
+ thd->m_reprepare_observer= save_reprepare_observer;
+ }
*hosts= 0;
return result;