summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@macbook.gmz>2006-10-17 16:36:44 +0300
committerunknown <gkodinov/kgeorge@macbook.gmz>2006-10-17 16:36:44 +0300
commitc208f46b66c1f1533f09462f0a697a6129fd3881 (patch)
tree7ae4f3f12d67f24169a9330a930b5a4b5cae6db3 /sql/sql_select.h
parentd2198ed9f70bdc41b457f83ae2f31e47b2022a9c (diff)
parent841ea461ce2b6782ce280806039c32e7a5b7dcdd (diff)
downloadmariadb-git-c208f46b66c1f1533f09462f0a697a6129fd3881.tar.gz
Merge bk-internal:/home/bk/mysql-5.0-opt
into macbook.gmz:/Users/kgeorge/mysql/work/B21798-5.0-opt-merge sql/mysql_priv.h: Auto merged sql/sql_delete.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_update.cc: Auto merged mysql-test/r/subselect.result: merge fixes for bug 21798 mysql-test/t/subselect.test: merge fixes for bug 21798
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index d5a1bf82bc8..e1ae8677a6e 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -282,6 +282,18 @@ public:
bool union_part; // this subselect is part of union
bool optimized; // flag to avoid double optimization in EXPLAIN
+ /*
+ storage for caching buffers allocated during query execution.
+ These buffers allocations need to be cached as the thread memory pool is
+ cleared only at the end of the execution of the whole query and not caching
+ allocations that occur in repetition at execution time will result in
+ excessive memory usage.
+ */
+ SORT_FIELD *sortorder; // make_unireg_sortorder()
+ TABLE **table_cache; // make_simple_join()
+ JOIN_TAB *join_tab_cache; // make_simple_join()
+ /* end of allocation caching storage */
+
JOIN(THD *thd_arg, List<Item> &fields_arg, ulonglong select_options_arg,
select_result *result_arg)
:fields_list(fields_arg)
@@ -307,6 +319,9 @@ public:
examined_rows= 0;
exec_tmp_table1= 0;
exec_tmp_table2= 0;
+ sortorder= 0;
+ table_cache= 0;
+ join_tab_cache= 0;
thd= thd_arg;
sum_funcs= sum_funcs2= 0;
procedure= 0;