summaryrefslogtreecommitdiff
path: root/sql/sql_cursor.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-08-14 17:23:34 +0300
committerMichael Widenius <monty@askmonty.org>2012-08-14 17:23:34 +0300
commit60589aeee03949033c66da5c1eae70d4342179fc (patch)
tree1cd399dbed17c5c7b4ed16eb7b872dc979af1c93 /sql/sql_cursor.cc
parentb39e6e3d093b45f792959ef06fea1c175263ae1a (diff)
downloadmariadb-git-60589aeee03949033c66da5c1eae70d4342179fc.tar.gz
Next part of merge. See TODO for details
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 c50cded7470..fd348e0b75f 100644
--- a/sql/sql_cursor.cc
+++ b/sql/sql_cursor.cc
@@ -97,6 +97,7 @@ public:
int mysql_open_cursor(THD *thd, select_result *result,
Server_side_cursor **pcursor)
{
+ PSI_statement_locker *parent_locker;
select_result *save_result;
Select_materialize *result_materialize;
LEX *lex= thd->lex;
@@ -115,7 +116,10 @@ int mysql_open_cursor(THD *thd, select_result *result,
&thd->security_ctx->priv_user[0],
(char *) thd->security_ctx->host_or_ip,
2);
+ parent_locker= thd->m_statement_psi;
+ thd->m_statement_psi= NULL;
rc= mysql_execute_command(thd);
+ thd->m_statement_psi= parent_locker;
MYSQL_QUERY_EXEC_DONE(rc);
lex->result= save_result;