MySQL 9.1.0
Source Code Documentation
RowIDUnionIterator Class Reference

#include <rowid_ordered_retrieval.h>

Inheritance diagram for RowIDUnionIterator:
[legend]

Public Member Functions

 RowIDUnionIterator (THD *thd, MEM_ROOT *return_mem_root, TABLE *table, Mem_root_array< unique_ptr_destroy_only< RowIterator > > children)
 
 ~RowIDUnionIterator () 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
 
 RowIterator (const RowIterator &)=delete
 
 RowIterator (RowIterator &&)=default
 
virtual const IteratorProfilerGetProfiler () const
 Get profiling data for this iterator (for 'EXPLAIN ANALYZE'). More...
 
virtual void SetOverrideProfiler (const IteratorProfiler *profiler)
 
virtual RowIteratorreal_iterator ()
 If this iterator is wrapping a different iterator (e.g. More...
 
virtual const RowIteratorreal_iterator () const
 

Private Attributes

Mem_root_array< unique_ptr_destroy_only< RowIterator > > m_children
 
Priority_queue< RowIterator *, std::vector< RowIterator *, Malloc_allocator< RowIterator * > >, Quick_ror_union_lessqueue
 
MEM_ROOTmem_root
 
ucharcur_rowid
 
ucharprev_rowid
 
bool have_prev_rowid
 
uint rowid_length
 
bool scans_inited
 
bool inited = false
 

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
 

Constructor & Destructor Documentation

◆ RowIDUnionIterator()

RowIDUnionIterator::RowIDUnionIterator ( THD thd,
MEM_ROOT return_mem_root,
TABLE table,
Mem_root_array< unique_ptr_destroy_only< RowIterator > >  children 
)

◆ ~RowIDUnionIterator()

RowIDUnionIterator::~RowIDUnionIterator ( )
override

Member Function Documentation

◆ Init()

bool RowIDUnionIterator::Init ( )
overridevirtual

Initialize or reinitialize the iterator.

You must always call Init() before trying a Read() (but Init() does not imply Read()).

You can call Init() multiple times; subsequent calls will rewind the iterator (or reposition it, depending on whether the iterator takes in e.g. a Index_lookup) and allow you to read the records anew.

Implements RowIterator.

◆ Read()

int RowIDUnionIterator::Read ( )
overridevirtual

Read a single row.

The row data is not actually returned from the function; it is put in the table's (or tables', in case of a join) record buffer, ie., table->records[0].

Return values
0OK
-1End of records
1Error

Implements RowIterator.

Member Data Documentation

◆ cur_rowid

uchar* RowIDUnionIterator::cur_rowid
private

◆ have_prev_rowid

bool RowIDUnionIterator::have_prev_rowid
private

◆ inited

bool RowIDUnionIterator::inited = false
private

◆ m_children

Mem_root_array<unique_ptr_destroy_only<RowIterator> > RowIDUnionIterator::m_children
private

◆ mem_root

MEM_ROOT* RowIDUnionIterator::mem_root
private

◆ prev_rowid

uchar* RowIDUnionIterator::prev_rowid
private

◆ queue

Priority_queue<RowIterator *, std::vector<RowIterator *, Malloc_allocator<RowIterator *> >, Quick_ror_union_less> RowIDUnionIterator::queue
private

◆ rowid_length

uint RowIDUnionIterator::rowid_length
private

◆ scans_inited

bool RowIDUnionIterator::scans_inited
private

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