![]() |
MySQL 9.1.0
Source Code Documentation
|
An iterator that reads from a table where only a single row is known to be matching, no matter what's on the left side, i.e., WHERE column=<const>. More...
#include <ref_row_iterators.h>
Public Member Functions | |
ConstIterator (THD *thd, TABLE *table, Index_lookup *table_ref, ha_rows *examined_rows) | |
bool | Init () override |
Initialize or reinitialize the iterator. More... | |
int | Read () override |
Read a constant table when there is at most one matching row, using an index lookup. More... | |
void | UnlockRow () override |
Rows from const tables are read once but potentially used multiple times during execution of a query. More... | |
![]() | |
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... | |
![]() | |
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 (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 | |
Index_lookup *const | m_ref |
bool | m_first_record_since_init |
ha_rows *const | m_examined_rows |
Additional Inherited Members | |
![]() | |
int | HandleError (int error) |
void | PrintError (int error) |
TABLE * | table () const |
![]() | |
THD * | thd () const |
An iterator that reads from a table where only a single row is known to be matching, no matter what's on the left side, i.e., WHERE column=<const>.
ConstIterator::ConstIterator | ( | THD * | thd, |
TABLE * | table, | ||
Index_lookup * | table_ref, | ||
ha_rows * | examined_rows | ||
) |
|
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 constant table when there is at most one matching row, using an index lookup.
0 | Row was found |
-1 | Row was not found |
1 | Got an error (other than row not found) during read |
Implements RowIterator.
|
inlineoverridevirtual |
Rows from const tables are read once but potentially used multiple times during execution of a query.
Ensure such rows are never unlocked during query execution.
Implements RowIterator.
|
private |
|
private |
|
private |