23#ifndef SQL_UNION_INCLUDED
24#define SQL_UNION_INCLUDED
36template <
class Element_type>
67 bool reset()
override;
70 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:850
This class represents a query expression (one query block or several query blocks combined with UNION...
Definition: sql_lex.h:622
Definition: query_result.h:173
Definition: sql_union.h:39
Query_result_union()
Definition: sql_union.h:46
bool reset() override
Reset and empty the temporary table that stores the materialized query result.
Definition: sql_union.cc:239
bool skip_create_table() const
Definition: sql_union.h:77
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:58
Temp_table_param tmp_table_param
Definition: sql_union.h:41
virtual bool flush()
Definition: sql_union.cc:139
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:167
bool send_data(THD *thd, const mem_root_deque< Item * > &items) override
Definition: sql_union.cc:112
uint get_hidden_field_count() const
Definition: sql_union.h:74
TABLE * table
Definition: sql_union.h:44
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:243
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:106
void cleanup() override
Cleanup after this execution.
Definition: sql_union.h:66
bool send_eof(THD *thd) override
Definition: sql_union.cc:137
Common base class for n-ary set operations, including unary.
Definition: query_term.h:396
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:33
bool optimize_derived(THD *thd)
Optimize the query expression representing a derived table/view.
Definition: sql_derived.cc:1560
bool create_materialized_table(THD *thd)
Create result table for a materialized derived table/view.
Definition: sql_derived.cc:1608
Object containing parameters used when creating and using temporary tables.
Definition: temp_table_param.h:94
uint hidden_field_count
Definition: temp_table_param.h:132
bool skip_create_table
true <=> don't actually create table handler when creating the result table.
Definition: temp_table_param.h:175
A (partial) implementation of std::deque allocating its blocks on a MEM_ROOT.
Definition: mem_root_deque.h:109
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:221
my_off_t ha_rows
Definition: my_base.h:1139
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:55
Definition: options.cc:48
std::list< T, ut::allocator< T > > list
Specialization of list which uses ut_allocator.
Definition: ut0new.h:2876
unsigned int uint
Definition: uca9-dump.cc:74