MySQL  8.0.28
Source Code Documentation
Query_result_union_direct Class Referencefinal

This class is effectively dead. More...

Inheritance diagram for Query_result_union_direct:
Query_result_union Query_result_interceptor Query_result

Public Member Functions

 Query_result_union_direct (Query_result *result, Query_block *last_query_block)
 
bool change_query_result (THD *thd, Query_result *new_result) override
 Replace the current query result with new_result and prepare it. More...
 
uint field_count (const mem_root_deque< Item * > &) const override
 
bool postponed_prepare (THD *thd, const mem_root_deque< Item * > &types) override
 
bool send_result_set_metadata (THD *, const mem_root_deque< Item * > &, uint) override
 
bool send_data (THD *, const mem_root_deque< Item * > &) override
 
bool optimize () override
 Optimize the result processing of a query expression, applicable to data change operation (not simple select queries). More...
 
bool start_execution (THD *thd) override
 Prepare for execution of the query expression or DML statement. More...
 
void send_error (THD *thd, uint errcode, const char *err) override
 
bool send_eof (THD *) override
 
bool flush () override
 
bool check_simple_query_block () const override
 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...
 
void abort_result_set (THD *thd) override
 
void cleanup (THD *) override
 Cleanup after this execution. More...
 
- Public Member Functions inherited from Query_result_union
 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[[maybe_unused]], const mem_root_deque< Item * > &types[[maybe_unused]])
 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
 
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_rowsrow_count () const override
 
- Public Member Functions inherited from Query_result_interceptor
 Query_result_interceptor ()
 
bool is_interceptor () const final
 Checks if this Query_result intercepts and transforms the result set. More...
 
- Public Member Functions inherited from Query_result
 Query_result ()
 
virtual ~Query_result ()=default
 
virtual bool needs_file_privilege () const
 
virtual bool need_explain_interceptor () const
 
virtual bool create_table_for_query_block (THD *)
 Create table, only needed to support CREATE TABLE ... SELECT. More...
 
void begin_dataset ()
 
virtual bool immediate_update (TABLE_LIST *t[[maybe_unused]]) 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...
 

Private Attributes

Query_resultresult
 Result object that receives all rows. More...
 
bool optimized
 Wrapped result is optimized. More...
 
bool execution_started
 Wrapped result has started execution. More...
 

Additional Inherited Members

- Public Attributes inherited from Query_result_union
TABLEtable
 
- Public Attributes inherited from Query_result
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 inherited from Query_result_union
Temp_table_param tmp_table_param
 
ha_rows m_rows_in_table
 Count of rows successfully stored in tmp table. More...
 
- Protected Attributes inherited from Query_result
Query_expressionunit
 

Detailed Description

This class is effectively dead.

It was used for non-DISTINCT UNIONs in the pre-iterator executor. Now it exists only as a shell for certain setup tasks, and should be removed.

Constructor & Destructor Documentation

◆ Query_result_union_direct()

Query_result_union_direct::Query_result_union_direct ( Query_result result,
Query_block last_query_block 
)
inline

Member Function Documentation

◆ abort_result_set()

void Query_result_union_direct::abort_result_set ( THD thd)
inlineoverridevirtual

Reimplemented from Query_result.

◆ change_query_result()

bool Query_result_union_direct::change_query_result ( THD thd,
Query_result new_result 
)
overridevirtual

Replace the current query result with new_result and prepare it.

Parameters
thdThread handle
new_resultNew query result
Returns
false if success, true if error

Reimplemented from Query_result.

◆ check_simple_query_block()

bool Query_result_union_direct::check_simple_query_block ( ) const
inlineoverridevirtual

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.

Return values
falsesuccess
trueerror, an error message is set

Reimplemented from Query_result.

◆ cleanup()

void Query_result_union_direct::cleanup ( THD )
inlineoverridevirtual

Cleanup after this execution.

Completes the execution and resets object before next execution of a prepared statement/stored procedure.

Reimplemented from Query_result.

◆ field_count()

uint Query_result_union_direct::field_count ( const mem_root_deque< Item * > &  ) const
inlineoverridevirtual

Reimplemented from Query_result_interceptor.

◆ flush()

bool Query_result_union_direct::flush ( )
inlineoverridevirtual

Reimplemented from Query_result_union.

◆ optimize()

bool Query_result_union_direct::optimize ( )
inlineoverridevirtual

Optimize the result processing of a query expression, applicable to data change operation (not simple select queries).

Returns
false if success, true if error

Reimplemented from Query_result.

◆ postponed_prepare()

bool Query_result_union_direct::postponed_prepare ( THD thd,
const mem_root_deque< Item * > &  types 
)
override

◆ send_data()

bool Query_result_union_direct::send_data ( THD ,
const mem_root_deque< Item * > &   
)
inlineoverridevirtual

Implements Query_result.

◆ send_eof()

bool Query_result_union_direct::send_eof ( THD )
inlineoverridevirtual

Implements Query_result.

◆ send_error()

void Query_result_union_direct::send_error ( THD thd,
uint  errcode,
const char *  err 
)
inlineoverridevirtual

Reimplemented from Query_result.

◆ send_result_set_metadata()

bool Query_result_union_direct::send_result_set_metadata ( THD ,
const mem_root_deque< Item * > &  ,
uint   
)
inlineoverridevirtual

Reimplemented from Query_result_interceptor.

◆ start_execution()

bool Query_result_union_direct::start_execution ( THD )
inlineoverridevirtual

Prepare for execution of the query expression or DML statement.

Generally, this will have an implementation only for outer-most Query_block objects, such as data change statements (for preparation of the target table(s)) or dump statements (for preparation of target file).

Returns
false if success, true if error

Reimplemented from Query_result.

Member Data Documentation

◆ execution_started

bool Query_result_union_direct::execution_started
private

Wrapped result has started execution.

◆ optimized

bool Query_result_union_direct::optimized
private

Wrapped result is optimized.

◆ result

Query_result* Query_result_union_direct::result
private

Result object that receives all rows.


The documentation for this class was generated from the following file: