diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2013-06-21 13:26:53 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2013-06-21 13:26:53 +0400 |
commit | af5e128e50cac8881f7bfca44cc473600abdce86 (patch) | |
tree | c3e235b5b5e6bdf5c0fa1e654f707001ee98dec3 /sql/sql_lex.cc | |
parent | ab4a13b2b91e260d8c75a3c41b7ff5c24747cee0 (diff) | |
download | mariadb-git-af5e128e50cac8881f7bfca44cc473600abdce86.tar.gz |
[SHOW] EXPLAIN UPDATE/DELETE, code re-structuring
- Handle statements inside SPs:
= regular statements
= SET command, which does not have its own statement.
- Handle execution of subquery from range optimizer:
allocate subquery QPFs on the same MEM_ROOT as the whole
query plan was allocated.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 3161dc85fb9..df38d9fcdb0 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -4251,7 +4251,7 @@ void st_select_lex::save_qpf(QPF_query *output) msg= "Query plan already deleted"; } set_explain_type(TRUE/* on_the_fly */); - QPF_select *qp_sel= new QPF_select; + QPF_select *qp_sel= new (output->mem_root) QPF_select; qp_sel->select_id= select_number; qp_sel->select_type= type; qp_sel->message= msg; @@ -4346,7 +4346,7 @@ int st_select_lex_unit::save_qpf(QPF_query *output) return 0; } - QPF_union *qpfu= new QPF_union; + QPF_union *qpfu= new (output->mem_root) QPF_union; /* TODO: The following code should be eliminated. If we have a capability to save Query Plan Footprints, we should just save them, and never need to @@ -4361,7 +4361,7 @@ int st_select_lex_unit::save_qpf(QPF_query *output) const char *msg="Query plan already deleted"; first->set_explain_type(TRUE/* on_the_fly */); - QPF_select *qp_sel= new QPF_select; + QPF_select *qp_sel= new (output->mem_root)QPF_select; qp_sel->select_id= first->select_number; qp_sel->select_type= first->type; qp_sel->message= msg; |