MySQL  8.0.27
Source Code Documentation
DynamicRangeIterator Class Referencefinal

#include <ref_row_iterators.h>

Inheritance diagram for DynamicRangeIterator:
TableRowIterator RowIterator

Public Member Functions

 DynamicRangeIterator (THD *thd, TABLE *table, QEP_TAB *qep_tab, ha_rows *examined_rows)
 
 ~DynamicRangeIterator () override
 
bool Init () override
 Initialize or reinitialize the iterator. More...
 
int Read () override
 Read a single row. More...
 
- Public Member Functions inherited from TableRowIterator
 TableRowIterator (THD *thd, TABLE *table)
 
void UnlockRow () override
 The default implementation of unlock-row method of RowIterator, used in all access methods except EQRefIterator. More...
 
void SetNullRowFlag (bool is_null_row) override
 Mark the current row buffer as containing a NULL row or not, so that if you read from it and the flag is true, you'll get only NULLs no matter what is actually in the buffer (typically some old leftover row). More...
 
void StartPSIBatchMode () override
 Start performance schema batch mode, if supported (otherwise ignored). More...
 
void EndPSIBatchModeIfStarted () override
 Ends performance schema batch mode, if started. More...
 
- Public Member Functions inherited from RowIterator
 RowIterator (THD *thd)
 
virtual ~RowIterator ()=default
 
virtual std::string TimingString () const
 
virtual RowIteratorreal_iterator ()
 If this iterator is wrapping a different iterator (e.g. More...
 
virtual const RowIteratorreal_iterator () const
 

Private Attributes

QEP_TABm_qep_tab
 
MEM_ROOT m_mem_root
 
unique_ptr_destroy_only< RowIteratorm_iterator
 
bool m_quick_traced_before = false
 Used by optimizer tracing to decide whether or not dynamic range analysis of this select has been traced already. More...
 
ha_rows *const m_examined_rows
 
MY_BITMAPm_read_set_without_base_columns
 Read set to be used when range optimizer picks covering index. More...
 
MY_BITMAP m_read_set_with_base_columns
 Read set to be used when range optimizer picks a non-covering index or when table scan gets picked. More...
 

Additional Inherited Members

- Protected Member Functions inherited from TableRowIterator
int HandleError (int error)
 
void PrintError (int error)
 
TABLEtable () const
 
- Protected Member Functions inherited from RowIterator
THDthd () const
 

Member Data Documentation

◆ m_examined_rows

ha_rows* const DynamicRangeIterator::m_examined_rows
private

◆ m_iterator

unique_ptr_destroy_only<RowIterator> DynamicRangeIterator::m_iterator
private

◆ m_mem_root

MEM_ROOT DynamicRangeIterator::m_mem_root
private

◆ m_qep_tab

QEP_TAB* DynamicRangeIterator::m_qep_tab
private

◆ m_quick_traced_before

bool DynamicRangeIterator::m_quick_traced_before = false
private

Used by optimizer tracing to decide whether or not dynamic range analysis of this select has been traced already.

If optimizer trace option DYNAMIC_RANGE is enabled, range analysis will be traced with different ranges for every record to the left of this table in the join. If disabled, range analysis will only be traced for the first range.

◆ m_read_set_with_base_columns

MY_BITMAP DynamicRangeIterator::m_read_set_with_base_columns
private

Read set to be used when range optimizer picks a non-covering index or when table scan gets picked.

It is setup by adding base columns to the read set setup by filter_gcol_for_dynamic_range_scan(). add_virtual_gcol_base_cols() adds the base columns when initializing this iterator.

◆ m_read_set_without_base_columns

MY_BITMAP* DynamicRangeIterator::m_read_set_without_base_columns
private

Read set to be used when range optimizer picks covering index.

This read set is same as what filter_gcol_for_dynamic_ranage_scan() sets up after filtering out the base columns for virtually generated columns from the original table read set. By filtering out the base columns, it avoids addition of unneeded columns for hash join/BKA.


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