MySQL  8.0.27
Source Code Documentation
PushedJoinRefIterator Class Referencefinal

Read a table assumed to be included in execution of a pushed join. More...

#include <ref_row_iterators.h>

Inheritance diagram for PushedJoinRefIterator:
TableRowIterator RowIterator

Public Member Functions

 PushedJoinRefIterator (THD *thd, TABLE *table, TABLE_REF *ref, bool use_order, bool is_unique, ha_rows *examined_rows)
 
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

TABLE_REF *const m_ref
 
const bool m_use_order
 
const bool m_is_unique
 
bool m_first_record_since_init
 
ha_rows *const m_examined_rows
 

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
 

Detailed Description

Read a table assumed to be included in execution of a pushed join.

This is the counterpart of RefIterator / EQRefIterator for child tables in a pushed join. As the underlying handler interface for pushed joins are the same for Ref / EQRef operations, we implement both in the same PushedJoinRefIterator class.

In order to differentiate between a 'range' and 'single-row lookup' in the DebugString(), the class takes a 'bool Unique' C'tor argument. This also offers some optimizations in implementation of Read().

When the table access is performed as part of the pushed join, all 'linked' child colums are prefetched together with the parent row. The handler will then only format the row as required by MySQL and set table status accordingly.

However, there may be situations where the prepared pushed join was not executed as assumed. It is the responsibility of the handler to handle these situation by letting ha_index_read_pushed() then effectively do a plain old' index_read_map(..., HA_READ_KEY_EXACT);

Member Data Documentation

◆ m_examined_rows

ha_rows* const PushedJoinRefIterator::m_examined_rows
private

◆ m_first_record_since_init

bool PushedJoinRefIterator::m_first_record_since_init
private

◆ m_is_unique

const bool PushedJoinRefIterator::m_is_unique
private

◆ m_ref

TABLE_REF* const PushedJoinRefIterator::m_ref
private

◆ m_use_order

const bool PushedJoinRefIterator::m_use_order
private

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