summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2013-08-24 12:20:51 +0400
committerSergey Petrunya <psergey@askmonty.org>2013-08-24 12:20:51 +0400
commitd2d9eb65e46f9afe10cd09d1b69f3d238e364c19 (patch)
treee79d183611f6fe499ee3674fdb14d3d49ff159eb /sql/sp_head.cc
parentf9c2b402f437a2278b04d971054fcacc57eb07aa (diff)
parent662bfed027dbf29d1d185ae677f0b5c79920287b (diff)
downloadmariadb-git-d2d9eb65e46f9afe10cd09d1b69f3d238e364c19.tar.gz
[SHOW] EXPLAIN UPDATE/DELETE, code re-structuring
- Merge with current 10.0-base
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index b3b1abe891d..0e69956e951 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -2988,6 +2988,7 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
}
reinit_stmt_before_use(thd, m_lex);
+ // not here, but inside every instr: create_qpf_query(m_lex);
if (open_tables)
res= instr->exec_open_and_lock_tables(thd, m_lex->query_tables);
@@ -3021,6 +3022,8 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
else if (! thd->in_sub_stmt)
thd->mdl_context.release_statement_locks();
}
+
+ delete_qpf_query(m_lex);
if (m_lex->query_tables_own_last)
{
@@ -3228,6 +3231,7 @@ sp_instr_set::execute(THD *thd, uint *nextp)
int
sp_instr_set::exec_core(THD *thd, uint *nextp)
{
+ create_qpf_query(thd->lex, thd->mem_root);
int res= thd->spcont->set_variable(thd, m_offset, &m_value);
if (res)
@@ -3240,6 +3244,7 @@ sp_instr_set::exec_core(THD *thd, uint *nextp)
my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR));
}
}
+ delete_qpf_query(thd->lex);
*nextp = m_ip+1;
return res;