summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2018-10-09 02:36:09 -0700
committerIgor Babaev <igor@askmonty.org>2019-02-06 17:02:44 -0800
commit16327fc2e76e9215059894b461e8aca7f989da00 (patch)
treed8189268b2af4eb6ac865e0d9c78cf2cd1eca587 /sql/sql_select.h
parent171fbbb968ed52dc7e2bbd33a6f8f72bbc6f5e88 (diff)
downloadmariadb-git-16327fc2e76e9215059894b461e8aca7f989da00.tar.gz
MDEV-17096 Pushdown of simple derived tables to storage engines
MDEV-17631 select_handler for a full query pushdown Interfaces + Proof of Concept for federatedx with test cases. The interfaces have been developed for integration of ColumnStore engine.
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h46
1 files changed, 45 insertions, 1 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 4140a0293f8..bca2387e1a0 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -2442,9 +2442,53 @@ public:
~Pushdown_query() { delete handler; }
/* Function that calls the above scan functions */
- int execute(JOIN *join);
+ int execute(JOIN *);
};
+class derived_handler;
+
+class Pushdown_derived: public Sql_alloc
+{
+private:
+ bool is_analyze;
+public:
+ TABLE_LIST *derived;
+ derived_handler *handler;
+
+ Pushdown_derived(TABLE_LIST *tbl, derived_handler *h);
+
+ ~Pushdown_derived();
+
+ int execute();
+};
+
+
+class select_handler;
+
+
+class Pushdown_select: public Sql_alloc
+{
+private:
+ bool is_analyze;
+ List<Item> result_columns;
+ bool send_result_set_metadata();
+ bool send_data();
+ bool send_eof();
+
+public:
+ SELECT_LEX *select;
+ select_handler *handler;
+
+ Pushdown_select(SELECT_LEX *sel, select_handler *h);
+
+ ~Pushdown_select();
+
+ bool init();
+
+ int execute();
+};
+
+
bool test_if_order_compatible(SQL_I_List<ORDER> &a, SQL_I_List<ORDER> &b);
int test_if_group_changed(List<Cached_item> &list);
int create_sort_index(THD *thd, JOIN *join, JOIN_TAB *tab, Filesort *fsort);