summaryrefslogtreecommitdiff
path: root/sql/sql_explain.h
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2014-06-24 19:41:43 +0400
committerSergei Petrunia <psergey@askmonty.org>2014-06-24 19:41:43 +0400
commitc08de06246f776c557b7795d53e2a956e156f533 (patch)
tree6c9ed33855eeb6c418fe390deef7f62db91d6d36 /sql/sql_explain.h
parent581b889771447f7a9f33d467f0b5ef2aa96e072b (diff)
downloadmariadb-git-c08de06246f776c557b7795d53e2a956e156f533.tar.gz
MDEV-406: ANALYZE $stmt: get ANALYZE work for subqueries
- "ANALYZE $stmt" should discard select's output, but it should still evaluate the output columns (otherwise, subqueries in select list are not executed) - SHOW EXPLAIN's code practice of calling JOIN::save_explain_data() after JOIN::exec() is disastrous for ANALYZE, because it resets all counters after the first execution. It is stopped = "Late" test_if_skip_sort_order() calls explicitly update their part of the query plan. = Also, I had to rewrite I_S optimization to actually have optimization and execution stages.
Diffstat (limited to 'sql/sql_explain.h')
-rw-r--r--sql/sql_explain.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_explain.h b/sql/sql_explain.h
index 203235f9f5c..417cfc0fffc 100644
--- a/sql/sql_explain.h
+++ b/sql/sql_explain.h
@@ -129,6 +129,12 @@ public:
join_tabs[n_join_tabs++]= tab;
return false;
}
+
+ /*
+ This is used to save the results of "late" test_if_skip_sort_order() calls
+ that are made from JOIN::exec
+ */
+ void replace_table(uint idx, Explain_table_access *new_tab);
public:
int select_id;