![]() |
MySQL 8.0.29
Source Code Documentation
|
#include <sql_union.h>
Public Member Functions | |
Query_result_union () | |
bool | prepare (THD *thd, const mem_root_deque< Item * > &list, Query_expression *u) override |
Perform preparation specific to the query expression or DML statement. More... | |
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 Query_result_union_direct). More... | |
bool | send_data (THD *thd, const mem_root_deque< Item * > &items) override |
bool | send_eof (THD *thd) override |
virtual bool | flush () |
void | cleanup (THD *) override |
Cleanup after this execution. More... | |
bool | reset () override |
Reset and empty the temporary table that stores the materialized query result. More... | |
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) |
Create a temporary table to store the result of a query expression (used, among others, when materializing a UNION DISTINCT). More... | |
const ha_rows * | row_count () const override |
uint | get_hidden_field_count () |
![]() | |
Query_result_interceptor () | |
uint | field_count (const mem_root_deque< Item * > &) const override |
bool | send_result_set_metadata (THD *, const mem_root_deque< Item * > &, uint) override |
bool | is_interceptor () const final |
Checks if this Query_result intercepts and transforms the result set. More... | |
![]() | |
Query_result () | |
virtual | ~Query_result ()=default |
virtual bool | needs_file_privilege () const |
virtual bool | change_query_result (THD *, Query_result *) |
Change wrapped Query_result. More... | |
virtual bool | need_explain_interceptor () const |
virtual bool | optimize () |
Optimize the result processing of a query expression, applicable to data change operation (not simple select queries). More... | |
virtual bool | start_execution (THD *) |
Prepare for execution of the query expression or DML statement. More... | |
virtual bool | create_table_for_query_block (THD *) |
Create table, only needed to support CREATE TABLE ... SELECT. More... | |
virtual void | send_error (THD *, uint errcode, const char *err) |
virtual bool | check_simple_query_block () const |
Check if this query returns a result set and therefore is allowed in cursors and set an error message if it is not the case. More... | |
virtual void | abort_result_set (THD *) |
void | begin_dataset () |
virtual bool | immediate_update (TABLE_LIST *t) const |
If this Query_result performs modifications to tables: tells if it modifies the given table's row as it's read (a.k.a. More... | |
Public Attributes | |
TABLE * | table |
![]() | |
ha_rows | estimated_rowcount |
Number of records estimated in this result. More... | |
double | estimated_cost |
Cost to execute the subquery which produces this result. More... | |
Protected Attributes | |
Temp_table_param | tmp_table_param |
ha_rows | m_rows_in_table |
Count of rows successfully stored in tmp table. More... | |
![]() | |
Query_expression * | unit |
Friends | |
bool | TABLE_LIST::create_materialized_table (THD *thd) |
bool | TABLE_LIST::optimize_derived (THD *thd) |
|
inline |
|
inlineoverridevirtual |
Cleanup after this execution.
Completes the execution and resets object before next execution of a prepared statement/stored procedure.
Reimplemented from Query_result.
bool Query_result_union::create_result_table | ( | THD * | thd_arg, |
const mem_root_deque< Item * > & | column_types, | ||
bool | is_union_distinct, | ||
ulonglong | options, | ||
const char * | table_alias, | ||
bool | bit_fields_as_long, | ||
bool | create_table | ||
) |
Create a temporary table to store the result of a query expression (used, among others, when materializing a UNION DISTINCT).
thd_arg | thread handle |
column_types | a list of items used to define columns of the temporary table |
is_union_distinct | if set, the temporary table will eliminate duplicates on insert |
options | create options |
table_alias | name of the temporary table |
bit_fields_as_long | convert bit fields to ulonglong |
create_table | If false, a table handler will not be created when creating the result table. |
Create a temporary table that is used to store the result of a UNION, derived table, or a materialized cursor.
|
virtual |
Reimplemented in Query_result_union_direct.
|
inline |
|
inlinevirtual |
Do prepare() if preparation has been postponed until column type information is computed (used by Query_result_union_direct).
thd | Thread handle |
types | Column types |
Reimplemented in Query_result_union_direct.
|
overridevirtual |
Perform preparation specific to the query expression or DML statement.
Reimplemented from Query_result.
|
overridevirtual |
Reset and empty the temporary table that stores the materialized query result.
Reimplemented from Query_result.
|
inlineoverridevirtual |
Reimplemented from Query_result.
|
overridevirtual |
Implements Query_result.
|
overridevirtual |
Implements Query_result.
|
friend |
|
friend |
|
protected |
Count of rows successfully stored in tmp table.
TABLE* Query_result_union::table |
|
protected |