24#ifndef SQL_UNION_INCLUDED
25#define SQL_UNION_INCLUDED
37template <
class Element_type>
68 bool reset()
override;
71 const char *alias,
bool bit_fields_as_long,
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:853
This class represents a query expression (one query block or several query blocks combined with UNION...
Definition: sql_lex.h:623
Definition: query_result.h:174
Definition: sql_union.h:40
Query_result_union()
Definition: sql_union.h:47
bool reset() override
Reset and empty the temporary table that stores the materialized query result.
Definition: sql_union.cc:240
bool skip_create_table() const
Definition: sql_union.h:78
virtual bool postponed_prepare(THD *thd, const mem_root_deque< Item * > &types)
Do prepare() if preparation has been postponed until column type information is computed (used by Que...
Definition: sql_union.h:59
Temp_table_param tmp_table_param
Definition: sql_union.h:42
virtual bool flush()
Definition: sql_union.cc:140
bool create_result_table(THD *thd, const mem_root_deque< Item * > &column_types, bool is_distinct, ulonglong options, const char *alias, bool bit_fields_as_long, bool create_table, Query_term_set_op *op=nullptr)
Create a temporary table to store the result of a query expression (used, among others,...
Definition: sql_union.cc:168
bool send_data(THD *thd, const mem_root_deque< Item * > &items) override
Definition: sql_union.cc:113
uint get_hidden_field_count() const
Definition: sql_union.h:75
TABLE * table
Definition: sql_union.h:45
void set_limit(ha_rows limit_rows) override
Set an effective LIMIT for the number of rows coming out of a materialized temporary table used for i...
Definition: sql_union.cc:244
bool prepare(THD *thd, const mem_root_deque< Item * > &list, Query_expression *u) override
Perform preparation specific to the query expression or DML statement.
Definition: sql_union.cc:107
void cleanup() override
Cleanup after this execution.
Definition: sql_union.h:67
bool send_eof(THD *thd) override
Definition: sql_union.cc:138
Common base class for n-ary set operations, including unary.
Definition: query_term.h:402
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
bool optimize_derived(THD *thd)
Optimize the query expression representing a derived table/view.
Definition: sql_derived.cc:1588
bool create_materialized_table(THD *thd)
Create result table for a materialized derived table/view.
Definition: sql_derived.cc:1636
Object containing parameters used when creating and using temporary tables.
Definition: temp_table_param.h:95
uint hidden_field_count
Definition: temp_table_param.h:133
bool skip_create_table
true <=> don't actually create table handler when creating the result table.
Definition: temp_table_param.h:176
A (partial) implementation of std::deque allocating its blocks on a MEM_ROOT.
Definition: mem_root_deque.h:110
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:222
my_off_t ha_rows
Definition: my_base.h:1140
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
Definition: options.cc:49
std::list< T, ut::allocator< T > > list
Specialization of list which uses ut_allocator.
Definition: ut0new.h:2879
unsigned int uint
Definition: uca9-dump.cc:75