MySQL 8.0.40
Source Code Documentation
materialize_iterator Namespace Reference

Classes

struct  QueryBlock
 A query block to be materialized by MaterializeIterator. More...
 

Functions

RowIteratorCreateIterator (THD *thd, Mem_root_array< materialize_iterator::QueryBlock > query_blocks_to_materialize, const MaterializePathParameters *path_params, unique_ptr_destroy_only< RowIterator > table_iterator, JOIN *join)
 Create an iterator that materializes a set of row into a temporary table and sets up a (pre-existing) iterator to access that. More...
 

Function Documentation

◆ CreateIterator()

RowIterator * materialize_iterator::CreateIterator ( THD thd,
Mem_root_array< materialize_iterator::QueryBlock query_blocks_to_materialize,
const MaterializePathParameters path_params,
unique_ptr_destroy_only< RowIterator table_iterator,
JOIN join 
)

Create an iterator that materializes a set of row into a temporary table and sets up a (pre-existing) iterator to access that.

See also
MaterializeIterator.
Parameters
thdThread handler.
query_blocks_to_materializeList of query blocks to materialize.
path_paramsMaterializePath settings.
table_iteratorIterator used for accessing the temporary table after materialization.
joinWhen materializing within the same JOIN (e.g., into a temporary table before sorting), as opposed to a derived table or a CTE, we may need to change the slice on the join before returning rows from the result table. If so, join and ref_slice would need to be set, and query_blocks_to_materialize should contain only one member, with the same join.
Returns
the iterator.