MySQL 9.1.0
Source Code Documentation
materialize_iterator::Operand Struct Reference

An operand (query block) to be materialized by MaterializeIterator. More...

#include <composite_iterators.h>

Public Attributes

unique_ptr_destroy_only< RowIteratorsubquery_iterator
 The iterator to read the actual rows from. More...
 
int select_number
 Used only for optimizer trace. More...
 
JOINjoin
 The JOIN that this query block represents. More...
 
bool disable_deduplication_by_hash_field = false
 If true, de-duplication checking via hash key is disabled when materializing this query block (ie., we simply avoid calling check_unique_fields() for each row). More...
 
bool copy_items
 If set to false, the Field objects in the output row are presumed already to be filled out. More...
 
ulonglong m_total_operands {0}
 The number of operands (i.e. More...
 
ulonglong m_operand_idx {0}
 The current operand (i.e. More...
 
uint m_first_distinct {0}
 Used for EXCEPT computation: the index of the first operand involved in a N-ary except operation which has DISTINCT. More...
 
Temp_table_paramtemp_table_param
 If copy_items is true, used for copying the Field objects into the temporary table row. More...
 
bool is_recursive_reference = false
 
FollowTailIteratorrecursive_reader = nullptr
 
double m_estimated_output_rows {0.0}
 The estimated number of rows produced by this block. More...
 

Detailed Description

An operand (query block) to be materialized by MaterializeIterator.

(

See also
MaterializeIterator for details.)

Member Data Documentation

◆ copy_items

bool materialize_iterator::Operand::copy_items

If set to false, the Field objects in the output row are presumed already to be filled out.

This is the case iff there's a windowing iterator earlier in the chain.

◆ disable_deduplication_by_hash_field

bool materialize_iterator::Operand::disable_deduplication_by_hash_field = false

If true, de-duplication checking via hash key is disabled when materializing this query block (ie., we simply avoid calling check_unique_fields() for each row).

Used when materializing UNION DISTINCT and UNION ALL parts into the same table. We'd like to just use a unique constraint via unique index instead, but there might be other indexes on the destination table that we'd like to keep, and the implementation doesn't allow disabling only one index.

If you use this on a query block, doing_hash_deduplication() must be true.

◆ is_recursive_reference

bool materialize_iterator::Operand::is_recursive_reference = false

◆ join

JOIN* materialize_iterator::Operand::join

The JOIN that this query block represents.

Used for performance schema batch mode: When materializing a query block that consists of a single table, MaterializeIterator needs to set up schema batch mode, since there is no nested loop iterator to do it. (This is similar to what ExecuteIteratorQuery() needs to do at the top level.)

◆ m_estimated_output_rows

double materialize_iterator::Operand::m_estimated_output_rows {0.0}

The estimated number of rows produced by this block.

◆ m_first_distinct

uint materialize_iterator::Operand::m_first_distinct {0}

Used for EXCEPT computation: the index of the first operand involved in a N-ary except operation which has DISTINCT.

This is significant for calculating whether to set the counter to zero or just decrement it when we see a right side operand.

◆ m_operand_idx

ulonglong materialize_iterator::Operand::m_operand_idx {0}

The current operand (i.e.

block) number, starting at zero. We use this for INTERSECT and EXCEPT materialization operand.

◆ m_total_operands

ulonglong materialize_iterator::Operand::m_total_operands {0}

The number of operands (i.e.

blocks) involved in the set operation: used for INTERSECT to determine if a value is present in all operands

◆ recursive_reader

FollowTailIterator* materialize_iterator::Operand::recursive_reader = nullptr

◆ select_number

int materialize_iterator::Operand::select_number

Used only for optimizer trace.

◆ subquery_iterator

unique_ptr_destroy_only<RowIterator> materialize_iterator::Operand::subquery_iterator

The iterator to read the actual rows from.

◆ temp_table_param

Temp_table_param* materialize_iterator::Operand::temp_table_param

If copy_items is true, used for copying the Field objects into the temporary table row.

Otherwise unused.


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