summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2012-05-10 13:43:48 +0400
committerSergey Petrunya <psergey@askmonty.org>2012-05-10 13:43:48 +0400
commit58b9164f0468768eff64841f4f066840b9ff2206 (patch)
tree68cc0cd3398c393767bbd3bd332060ec8f26fb10 /sql/sql_select.h
parentcdc9a1172d7b75b16d92a6179478c2689ac04bae (diff)
downloadmariadb-git-58b9164f0468768eff64841f4f066840b9ff2206.tar.gz
MDEV-238: SHOW EXPLAIN: Server crashes in JOIN::print_explain with FROM subquery and GROUP BY
- Support SHOW EXPLAIN for selects that have "Using temporary; Using filesort".
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 779702e4b1c..c60419f1ffd 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -896,6 +896,20 @@ protected:
public:
JOIN_TAB *join_tab, **best_ref;
+
+ /*
+ For "Using temporary+Using filesort" queries, JOIN::join_tab can point to
+ either:
+ 1. array of join tabs describing how to run the select, or
+ 2. array of single join tab describing read from the temporary table.
+
+ SHOW EXPLAIN code needs to read/show #1. This is why two next members are
+ there for saving it.
+ */
+ JOIN_TAB *table_access_tabs;
+ uint top_table_access_tabs_count;
+
+
JOIN_TAB **map2table; ///< mapping between table indexes and JOIN_TABs
JOIN_TAB *join_tab_save; ///< saved join_tab for subquery reexecution