MySQL 9.1.0
Source Code Documentation
MaterializePathParameters Struct Reference

#include <materialize_path_parameters.h>

Classes

struct  Operand
 

Public Types

enum  DedupType : uint8_t { DEDUP_FOR_DISTINCT , DEDUP_FOR_GROUP_BY , NO_DEDUP }
 The context for which deduplication is being used. More...
 

Public Attributes

Mem_root_array< Operandm_operands
 
Mem_root_array< const AccessPath * > * invalidators
 
TABLEtable
 Handle to table to materialize into. More...
 
Common_table_exprcte
 If materializing a CTE, points to it (see m_cte), otherwise nullptr. More...
 
Query_expressionunit
 The query expression we are materializing. More...
 
int ref_slice
 
bool rematerialize
 True if rematerializing on every Init() call (e.g., because we have a dependency on a value from outside the query block). More...
 
ha_rows limit_rows
 Used for when pushing LIMIT down to MaterializeIterator; this is more efficient than having a LimitOffsetIterator above the MaterializeIterator, since we can stop materializing when there are enough rows. More...
 
bool reject_multiple_rows
 True if this is the top level iterator for a materialized derived table transformed from a scalar subquery which needs run-time cardinality check. More...
 
DedupType deduplication_reason {NO_DEDUP}
 

Member Enumeration Documentation

◆ DedupType

The context for which deduplication is being used.

Note: this deduplication is different than the deduplication for UNION which is handled separately, not through this enum.

Enumerator
DEDUP_FOR_DISTINCT 
DEDUP_FOR_GROUP_BY 
NO_DEDUP 

Member Data Documentation

◆ cte

Common_table_expr* MaterializePathParameters::cte

If materializing a CTE, points to it (see m_cte), otherwise nullptr.

◆ deduplication_reason

DedupType MaterializePathParameters::deduplication_reason {NO_DEDUP}

◆ invalidators

Mem_root_array<const AccessPath *>* MaterializePathParameters::invalidators

◆ limit_rows

ha_rows MaterializePathParameters::limit_rows

Used for when pushing LIMIT down to MaterializeIterator; this is more efficient than having a LimitOffsetIterator above the MaterializeIterator, since we can stop materializing when there are enough rows.

(This is especially important for recursive CTEs.) Note that we cannot have a LimitOffsetIterator below the MaterializeIterator, as that would count wrong if we have deduplication, and would not work at all for recursive CTEs. Set to HA_POS_ERROR for no limit.

◆ m_operands

Mem_root_array<Operand> MaterializePathParameters::m_operands

◆ ref_slice

int MaterializePathParameters::ref_slice
See also
JOIN. If we are materializing across JOINs, e.g. derived tables, ref_slice should be left at -1.

◆ reject_multiple_rows

bool MaterializePathParameters::reject_multiple_rows

True if this is the top level iterator for a materialized derived table transformed from a scalar subquery which needs run-time cardinality check.

◆ rematerialize

bool MaterializePathParameters::rematerialize

True if rematerializing on every Init() call (e.g., because we have a dependency on a value from outside the query block).

◆ table

TABLE* MaterializePathParameters::table

Handle to table to materialize into.

◆ unit

Query_expression* MaterializePathParameters::unit

The query expression we are materializing.


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