summaryrefslogtreecommitdiff
path: root/sql/sql_select.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_select.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_select.h')
-rw-r--r--sql/sql_select.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index e31767f8835..c1eadd90fcb 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -537,6 +537,11 @@ typedef struct st_join_table {
}
void remove_redundant_bnl_scan_conds();
+
+ void save_explain_data(Explain_table_access *eta, table_map prefix_tables,
+ bool distinct, struct st_join_table *first_top_tab);
+
+ void update_explain_data(uint idx);
} JOIN_TAB;