MySQL 9.0.0
Source Code Documentation
GroupIndexSkipScanIterator Class Reference

#include <group_index_skip_scan.h>

Inheritance diagram for GroupIndexSkipScanIterator:
[legend]

Public Member Functions

 GroupIndexSkipScanIterator (THD *thd, TABLE *table_arg, const Mem_root_array< Item_sum * > *min_functions, const Mem_root_array< Item_sum * > *max_functions, bool have_agg_distinct, KEY_PART_INFO *min_max_arg_part, uint group_prefix_len, uint group_key_parts, uint real_key_parts, uint max_used_key_length_arg, KEY *index_info, uint use_index, uint key_infix_len, MEM_ROOT *return_mem_root, bool is_index_scan, const Quick_ranges *prefix_ranges, const Quick_ranges_array *key_infix_ranges, const Quick_ranges *min_max_ranges)
 
 ~GroupIndexSkipScanIterator () override
 
bool Init () override
 Initialize or reinitialize the iterator. More...
 
int Read () override
 Read a single row. More...
 
bool is_agg_distinct () const
 
- 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 ([[maybe_unused]] const IteratorProfiler *profiler)
 
virtual RowIteratorreal_iterator ()
 If this iterator is wrapping a different iterator (e.g. More...
 
virtual const RowIteratorreal_iterator () const
 

Private Member Functions

int next_prefix ()
 
int get_next_prefix (uint prefix_length, uint group_key_parts, uchar *cur_prefix)
 
bool append_next_infix ()
 
void reset_group ()
 
int next_min_in_range ()
 
int next_max_in_range ()
 
int next_min ()
 
int next_max ()
 
void update_min_result (bool *reset)
 
void update_max_result (bool *reset)
 

Private Attributes

uint index
 
KEYindex_info
 
uchargroup_prefix
 
const uint group_prefix_len
 
uint group_key_parts
 
ucharlast_prefix
 
bool have_agg_distinct
 
bool seen_first_key
 
KEY_PART_INFOmin_max_arg_part
 
uint min_max_arg_len
 
bool min_max_keypart_asc
 
uint key_infix_len
 
uint max_used_key_length
 
uint cur_infix_range_position [MAX_REF_PARTS]
 
bool seen_all_infix_ranges
 
const Quick_rangesprefix_ranges
 
unsigned cur_prefix_range_idx
 
QUICK_RANGElast_prefix_range
 
const Quick_rangesmin_max_ranges
 
const Quick_ranges_arraykey_infix_ranges
 
uint real_prefix_len
 
uint real_key_parts
 
const Mem_root_array< Item_sum * > * min_functions
 
const Mem_root_array< Item_sum * > * max_functions
 
bool is_index_scan
 
bool m_seen_eof
 
MEM_ROOTmem_root
 

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

◆ GroupIndexSkipScanIterator()

GroupIndexSkipScanIterator::GroupIndexSkipScanIterator ( THD thd,
TABLE table_arg,
const Mem_root_array< Item_sum * > *  min_functions,
const Mem_root_array< Item_sum * > *  max_functions,
bool  have_agg_distinct,
KEY_PART_INFO min_max_arg_part,
uint  group_prefix_len,
uint  group_key_parts,
uint  real_key_parts,
uint  max_used_key_length_arg,
KEY index_info,
uint  use_index,
uint  key_infix_len,
MEM_ROOT return_mem_root,
bool  is_index_scan,
const Quick_ranges prefix_ranges,
const Quick_ranges_array key_infix_ranges,
const Quick_ranges min_max_ranges 
)

◆ ~GroupIndexSkipScanIterator()

GroupIndexSkipScanIterator::~GroupIndexSkipScanIterator ( )
override

Member Function Documentation

◆ append_next_infix()

bool GroupIndexSkipScanIterator::append_next_infix ( )
private

◆ get_next_prefix()

int GroupIndexSkipScanIterator::get_next_prefix ( uint  prefix_length,
uint  group_key_parts,
uchar cur_prefix 
)
private

◆ Init()

bool GroupIndexSkipScanIterator::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.

◆ is_agg_distinct()

bool GroupIndexSkipScanIterator::is_agg_distinct ( ) const
inline

◆ next_max()

int GroupIndexSkipScanIterator::next_max ( )
private

◆ next_max_in_range()

int GroupIndexSkipScanIterator::next_max_in_range ( )
private

◆ next_min()

int GroupIndexSkipScanIterator::next_min ( )
private

◆ next_min_in_range()

int GroupIndexSkipScanIterator::next_min_in_range ( )
private

◆ next_prefix()

int GroupIndexSkipScanIterator::next_prefix ( )
private

◆ Read()

int GroupIndexSkipScanIterator::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.

◆ reset_group()

void GroupIndexSkipScanIterator::reset_group ( )
private

◆ update_max_result()

void GroupIndexSkipScanIterator::update_max_result ( bool *  reset)
private

◆ update_min_result()

void GroupIndexSkipScanIterator::update_min_result ( bool *  reset)
private

Member Data Documentation

◆ cur_infix_range_position

uint GroupIndexSkipScanIterator::cur_infix_range_position[MAX_REF_PARTS]
private

◆ cur_prefix_range_idx

unsigned GroupIndexSkipScanIterator::cur_prefix_range_idx
private

◆ group_key_parts

uint GroupIndexSkipScanIterator::group_key_parts
private

◆ group_prefix

uchar* GroupIndexSkipScanIterator::group_prefix
private

◆ group_prefix_len

const uint GroupIndexSkipScanIterator::group_prefix_len
private

◆ have_agg_distinct

bool GroupIndexSkipScanIterator::have_agg_distinct
private

◆ index

uint GroupIndexSkipScanIterator::index
private

◆ index_info

KEY* GroupIndexSkipScanIterator::index_info
private

◆ is_index_scan

bool GroupIndexSkipScanIterator::is_index_scan
private

◆ key_infix_len

uint GroupIndexSkipScanIterator::key_infix_len
private

◆ key_infix_ranges

const Quick_ranges_array* GroupIndexSkipScanIterator::key_infix_ranges
private

◆ last_prefix

uchar* GroupIndexSkipScanIterator::last_prefix
private

◆ last_prefix_range

QUICK_RANGE* GroupIndexSkipScanIterator::last_prefix_range
private

◆ m_seen_eof

bool GroupIndexSkipScanIterator::m_seen_eof
private

◆ max_functions

const Mem_root_array<Item_sum *>* GroupIndexSkipScanIterator::max_functions
private

◆ max_used_key_length

uint GroupIndexSkipScanIterator::max_used_key_length
private

◆ mem_root

MEM_ROOT* GroupIndexSkipScanIterator::mem_root
private

◆ min_functions

const Mem_root_array<Item_sum *>* GroupIndexSkipScanIterator::min_functions
private

◆ min_max_arg_len

uint GroupIndexSkipScanIterator::min_max_arg_len
private

◆ min_max_arg_part

KEY_PART_INFO* GroupIndexSkipScanIterator::min_max_arg_part
private

◆ min_max_keypart_asc

bool GroupIndexSkipScanIterator::min_max_keypart_asc
private

◆ min_max_ranges

const Quick_ranges* GroupIndexSkipScanIterator::min_max_ranges
private

◆ prefix_ranges

const Quick_ranges* GroupIndexSkipScanIterator::prefix_ranges
private

◆ real_key_parts

uint GroupIndexSkipScanIterator::real_key_parts
private

◆ real_prefix_len

uint GroupIndexSkipScanIterator::real_prefix_len
private

◆ seen_all_infix_ranges

bool GroupIndexSkipScanIterator::seen_all_infix_ranges
private

◆ seen_first_key

bool GroupIndexSkipScanIterator::seen_first_key
private

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