MySQL 8.0.39
Source Code Documentation
|
#include <ref_row_iterators.h>
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 |
RowIterator (const RowIterator &)=delete | |
RowIterator (RowIterator &&)=default | |
virtual const IteratorProfiler * | GetProfiler () const |
Get profiling data for this iterator (for 'EXPLAIN ANALYZE'). More... | |
virtual void | SetOverrideProfiler ([[maybe_unused]] const IteratorProfiler *profiler) |
virtual RowIterator * | real_iterator () |
If this iterator is wrapping a different iterator (e.g. More... | |
virtual const RowIterator * | real_iterator () const |
Private Attributes | |
QEP_TAB * | m_qep_tab |
MEM_ROOT | m_mem_root |
unique_ptr_destroy_only< RowIterator > | m_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 |
Additional Inherited Members | |
Protected Member Functions inherited from TableRowIterator | |
int | HandleError (int error) |
void | PrintError (int error) |
TABLE * | table () const |
Protected Member Functions inherited from RowIterator | |
THD * | thd () const |
DynamicRangeIterator::DynamicRangeIterator | ( | THD * | thd, |
TABLE * | table, | ||
QEP_TAB * | qep_tab, | ||
ha_rows * | examined_rows | ||
) |
|
override |
|
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.
|
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].
0 | OK |
-1 | End of records |
1 | Error |
Implements RowIterator.
|
private |
|
private |
|
private |
|
private |
|
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.