summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorgkodinov/kgeorge@magare.gmz <>2007-05-04 10:48:51 +0300
committergkodinov/kgeorge@magare.gmz <>2007-05-04 10:48:51 +0300
commit6badb08ce30c7b96714e7df91b8d7cf008a7bbb9 (patch)
tree063e8080c776ed341a337770fb33a4588175b108 /sql/sql_select.h
parentb77a85ef22f2b728d185e5e0b0e9d1d5ff5bb940 (diff)
downloadmariadb-git-6badb08ce30c7b96714e7df91b8d7cf008a7bbb9.tar.gz
Bug #27807.
Non-correlated scalar subqueries may get executed in EXPLAIN at the optimization phase if they are part of a right hand sargable expression. If the scalar subquery uses a temp table to materialize its results it will replace the subquery structure from the parser with a simple select from the materialization table. As a result the EXPLAIN will crash as the temporary materialization table is not to be shown in EXPLAIN at all. Fixed by preserving the original query structure right after calling optimize() for scalar subqueries with temp tables executed during EXPLAIN.
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 9aa6fc1cfcd..5081366c10b 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -434,6 +434,7 @@ public:
void cleanup(bool full);
void clear();
bool save_join_tab();
+ bool init_save_join_tab();
bool send_row_on_empty_set()
{
return (do_send_rows && tmp_table_param.sum_func_count != 0 &&