summaryrefslogtreecommitdiff
path: root/sql/sql_cursor.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-06-01 15:51:25 +0200
committerSergei Golubchik <serg@mariadb.org>2015-06-01 15:51:25 +0200
commit5091a4ba755250ed8e35f4f5a39a118d476cd8f1 (patch)
tree370ba468d78204544b56e9d967d8d09e1317a1ed /sql/sql_cursor.cc
parent84eaf0911f311acba797c265ef7508ab6c108b35 (diff)
parent0880284bf715b4916cc735e19b76d1062c2bfdcf (diff)
downloadmariadb-git-5091a4ba755250ed8e35f4f5a39a118d476cd8f1.tar.gz
Merge tag 'mariadb-10.0.19' into 10.1
Diffstat (limited to 'sql/sql_cursor.cc')
-rw-r--r--sql/sql_cursor.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_cursor.cc b/sql/sql_cursor.cc
index 912f6d97519..27dea480025 100644
--- a/sql/sql_cursor.cc
+++ b/sql/sql_cursor.cc
@@ -98,6 +98,7 @@ public:
int mysql_open_cursor(THD *thd, select_result *result,
Server_side_cursor **pcursor)
{
+ sql_digest_state *parent_digest;
PSI_statement_locker *parent_locker;
select_result *save_result;
Select_materialize *result_materialize;
@@ -117,12 +118,15 @@ int mysql_open_cursor(THD *thd, select_result *result,
&thd->security_ctx->priv_user[0],
(char *) thd->security_ctx->host_or_ip,
2);
+ parent_digest= thd->m_digest;
parent_locker= thd->m_statement_psi;
+ thd->m_digest= NULL;
thd->m_statement_psi= NULL;
/* Mark that we can't use query cache with cursors */
thd->query_cache_is_applicable= 0;
rc= mysql_execute_command(thd);
thd->lex->restore_set_statement_var();
+ thd->m_digest= parent_digest;
thd->m_statement_psi= parent_locker;
MYSQL_QUERY_EXEC_DONE(rc);