summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2013-06-27 18:28:14 +0400
committerSergey Petrunya <psergey@askmonty.org>2013-06-27 18:28:14 +0400
commitef47cc1f091f76740212e125fe91f113028cbaa8 (patch)
treeda246c3fb17d79c00d4491406edffbbd373b9fbb /sql/sql_union.cc
parent639baee61bdfefe124414db6b12d40061a086e5b (diff)
parentbefacafd73d4892f2ad84991ad7c2d4626e45c47 (diff)
downloadmariadb-git-ef47cc1f091f76740212e125fe91f113028cbaa8.tar.gz
[SHOW] EXPLAIN UPDATE/DELETE, code re-structuring
- Merge with 10.0-base
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index eb4454ecab3..e4a9c7630e6 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -617,6 +617,7 @@ bool st_select_lex_unit::exec()
ulonglong add_rows=0;
ha_rows examined_rows= 0;
DBUG_ENTER("st_select_lex_unit::exec");
+ bool was_executed= executed;
if (executed && !uncacheable && !describe)
DBUG_RETURN(FALSE);
@@ -626,6 +627,9 @@ bool st_select_lex_unit::exec()
saved_error= optimize();
+ if (!was_executed && thd->lex->query_plan_footprint)
+ save_union_qpf(thd->lex->query_plan_footprint);
+
if (uncacheable || !item || !item->assigned() || describe)
{
for (SELECT_LEX *sl= select_cursor; sl; sl= sl->next_select())
@@ -772,6 +776,9 @@ bool st_select_lex_unit::exec()
*/
if (!fake_select_lex->ref_pointer_array)
fake_select_lex->n_child_sum_items+= global_parameters->n_sum_items;
+
+ if (!was_executed && thd->lex->query_plan_footprint)
+ save_union_qpf_part2(thd->lex->query_plan_footprint);
saved_error= mysql_select(thd, &fake_select_lex->ref_pointer_array,
&result_table_list,