summaryrefslogtreecommitdiff
path: root/sql/derived_handler.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2019-02-12 22:56:24 -0800
committerIgor Babaev <igor@askmonty.org>2019-02-12 22:56:24 -0800
commit27c3abde3071ad2010cbcda5b07435ad15364a70 (patch)
tree0d4e4066762076beaba6c8d2e774202be7146e2c /sql/derived_handler.h
parent17d00d9a94da2c2b57fc7cf75036d92ee6dc9298 (diff)
downloadmariadb-git-27c3abde3071ad2010cbcda5b07435ad15364a70.tar.gz
MDEV-17096 Pushdown of simple derived tables to storage engines
MDEV-17631 select_handler for a full query pushdown Added comments and file headers for files introduced in these tasks.
Diffstat (limited to 'sql/derived_handler.h')
-rw-r--r--sql/derived_handler.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/sql/derived_handler.h b/sql/derived_handler.h
index c312a93a1f7..171165bbe6f 100644
--- a/sql/derived_handler.h
+++ b/sql/derived_handler.h
@@ -1,3 +1,19 @@
+/*
+ Copyright (c) 2016, 2017 MariaDB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#ifndef DERIVED_HANDLER_INCLUDED
#define DERIVED_HANDLER_INCLUDED
@@ -8,6 +24,13 @@ class TMP_TABLE_PARAM;
typedef class st_select_lex_unit SELECT_LEX_UNIT;
+/**
+ @class derived_handler
+
+ This interface class is to be used for execution of queries that specify
+ derived table by foreign engines
+*/
+
class derived_handler
{
public:
@@ -23,11 +46,12 @@ public:
*/
TABLE *table;
+ /* The parameters if the temporary table used at its creation */
TMP_TABLE_PARAM *tmp_table_param;
- SELECT_LEX_UNIT *unit;
+ SELECT_LEX_UNIT *unit; // Specifies the derived table
- SELECT_LEX *select;
+ SELECT_LEX *select; // The first select of the specification
derived_handler(THD *thd_arg, handlerton *ht_arg)
: thd(thd_arg), ht(ht_arg), derived(0),table(0), tmp_table_param(0),
@@ -53,7 +77,7 @@ public:
virtual int end_scan()=0;
/* Report errors */
- virtual void print_error(int error, myf errflag)=0;
+ virtual void print_error(int error, myf errflag);
void set_derived(TABLE_LIST *tbl);
};