summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-10-02 10:19:40 +0200
committerSergei Golubchik <serg@mariadb.org>2015-10-05 17:14:15 +0200
commit7ca8b4bbfa3fc1ac12bbfc20530426fa534b9142 (patch)
tree9cc3720ca103f46bb84da6b2f77339a9a404e7c5 /sql/sql_select.h
parent9ca3d9ea9cc3518706dc8e0e0ac89a58c34dc260 (diff)
downloadmariadb-git-7ca8b4bbfa3fc1ac12bbfc20530426fa534b9142.tar.gz
move internal API out from group_by_handler
into a Pushdown_query object
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 4f07a51788a..79894742caa 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -884,6 +884,7 @@ public:
JOIN_TAB *end;
};
+class Pushdown_query;
class JOIN :public Sql_alloc
{
@@ -1088,7 +1089,7 @@ public:
/* points to a storage engine if all tables comes from the storage engine */
handlerton *one_storage_engine;
- group_by_handler *storage_handler_for_group_by;
+ Pushdown_query *pushdown_query;
JOIN_TAB *original_join_tab;
uint original_table_count;
@@ -1391,7 +1392,7 @@ public:
no_rows_in_result_called= 0;
positions= best_positions= 0;
one_storage_engine= 0;
- storage_handler_for_group_by= 0;
+ pushdown_query= 0;
original_join_tab= 0;
do_select_call_count= 0;
@@ -1964,5 +1965,21 @@ ulong check_selectivity(THD *thd,
TABLE *table,
List<COND_STATISTIC> *conds);
+class Pushdown_query: public Sql_alloc
+{
+public:
+ SELECT_LEX *select_lex;
+ bool store_data_in_temp_table;
+ group_by_handler *handler;
+
+ Pushdown_query(SELECT_LEX *select_lex_arg, group_by_handler *handler_arg)
+ : select_lex(select_lex_arg), store_data_in_temp_table(0),
+ handler(handler_arg) {}
+
+ ~Pushdown_query() { delete handler; }
+
+ /* Function that calls the above scan functions */
+ int execute(JOIN *join);
+};
#endif /* SQL_SELECT_INCLUDED */