1#ifndef SQL_ITERATORS_SORTING_ITERATOR_H_
2#define SQL_ITERATORS_SORTING_ITERATOR_H_
71 std::span<AccessPath *> single_row_index_lookups,
Row iterators that scan a single table without reference to other tables or iterators.
A class wrapping misc buffers used for sorting.
Definition: sql_sort.h:189
Sorting related info.
Definition: filesort.h:52
Definition: sql_executor.h:256
A context for reading through a single table using a chosen access method: index read,...
Definition: row_iterator.h:82
THD * thd() const
Definition: row_iterator.h:228
Fetch the record IDs from a memory buffer, but the records themselves from the table on disk.
Definition: basic_row_iterators.h:218
Fetch the records from a memory buffer.
Definition: basic_row_iterators.h:182
Fetch the record IDs from a temporary file, then the records themselves from the table on disk.
Definition: basic_row_iterators.h:293
Fetch the records from a tempoary file.
Definition: basic_row_iterators.h:259
Definition: sql_sort.h:156
An adapter that takes in another RowIterator and produces the same rows, just in sorted order.
Definition: sorting_iterator.h:58
int Read() override
Read a single row.
Definition: sorting_iterator.h:91
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...
Definition: sorting_iterator.cc:512
unique_ptr_destroy_only< RowIterator > m_source_iterator
Definition: sorting_iterator.h:117
const table_map m_tables_to_get_rowid_for
Definition: sorting_iterator.h:135
const ha_rows m_num_rows_estimate
Definition: sorting_iterator.h:134
int DoSort()
Definition: sorting_iterator.cc:533
unique_ptr_destroy_only< RowIterator > m_result_iterator
Definition: sorting_iterator.h:124
union SortingIterator::IteratorHolder m_result_iterator_holder
Filesort_info m_fs_info
Definition: sorting_iterator.h:127
Filesort * m_filesort
Definition: sorting_iterator.h:112
void ReleaseBuffers()
Definition: sorting_iterator.cc:425
std::span< AccessPath * > m_single_row_index_lookups
Definition: sorting_iterator.h:132
bool Init() override
Initialize or reinitialize the iterator.
Definition: sorting_iterator.cc:439
ha_rows * m_examined_rows
Definition: sorting_iterator.h:136
void CleanupAfterQuery()
Optional (when JOIN::destroy() runs, the iterator and its buffers will be cleaned up anyway); used to...
Definition: sorting_iterator.cc:418
~SortingIterator() override
Definition: sorting_iterator.cc:413
SortingIterator(THD *thd, Filesort *filesort, unique_ptr_destroy_only< RowIterator > source, std::span< AccessPath * > single_row_index_lookups, ha_rows num_rows_estimate, table_map tables_to_get_rowid_for, ha_rows *examined_rows)
Definition: sorting_iterator.cc:401
const Filesort * filesort() const
Definition: sorting_iterator.h:106
void UnlockRow() override
Definition: sorting_iterator.h:95
Sort_result m_sort_result
Definition: sorting_iterator.h:129
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
This file follows Google coding style, except for the name MEM_ROOT (which is kept for historical rea...
std::unique_ptr< T, Destroy_only< T > > unique_ptr_destroy_only
std::unique_ptr, but only destroying.
Definition: my_alloc.h:480
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1141
uint64_t table_map
Definition: my_table_map.h:30
repeated Source source
Definition: replication_asynchronous_connection_failover.proto:42
Access paths are a query planning structure that correspond 1:1 to iterators, in that an access path ...
Definition: access_path.h:238
Definition: sorting_iterator.h:145
IteratorHolder()
Definition: sorting_iterator.h:146
SortFileIterator< false > sort_file
Definition: sorting_iterator.h:153
SortFileIndirectIterator sort_file_indirect
Definition: sorting_iterator.h:154
SortBufferIterator< false > sort_buffer
Definition: sorting_iterator.h:150
SortFileIterator< true > sort_file_packed_addons
Definition: sorting_iterator.h:152
SortBufferIterator< true > sort_buffer_packed_addons
Definition: sorting_iterator.h:149
SortBufferIndirectIterator sort_buffer_indirect
Definition: sorting_iterator.h:151
~IteratorHolder()
Definition: sorting_iterator.h:147