1#ifndef SQL_ITERATORS_SORTING_ITERATOR_H_
2#define SQL_ITERATORS_SORTING_ITERATOR_H_
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:56
int Read() override
Read a single row.
Definition: sorting_iterator.h:88
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:503
unique_ptr_destroy_only< RowIterator > m_source_iterator
Definition: sorting_iterator.h:114
const table_map m_tables_to_get_rowid_for
Definition: sorting_iterator.h:129
const ha_rows m_num_rows_estimate
Definition: sorting_iterator.h:128
int DoSort()
Definition: sorting_iterator.cc:524
unique_ptr_destroy_only< RowIterator > m_result_iterator
Definition: sorting_iterator.h:121
union SortingIterator::IteratorHolder m_result_iterator_holder
Filesort_info m_fs_info
Definition: sorting_iterator.h:124
Filesort * m_filesort
Definition: sorting_iterator.h:109
void ReleaseBuffers()
Definition: sorting_iterator.cc:424
bool Init() override
Initialize or reinitialize the iterator.
Definition: sorting_iterator.cc:438
ha_rows * m_examined_rows
Definition: sorting_iterator.h:130
void CleanupAfterQuery()
Optional (when JOIN::destroy() runs, the iterator and its buffers will be cleaned up anyway); used to...
Definition: sorting_iterator.cc:417
~SortingIterator() override
Definition: sorting_iterator.cc:412
const Filesort * filesort() const
Definition: sorting_iterator.h:103
void UnlockRow() override
Definition: sorting_iterator.h:92
SortingIterator(THD *thd, Filesort *filesort, unique_ptr_destroy_only< RowIterator > source, ha_rows num_rows_estimate, table_map tables_to_get_rowid_for, ha_rows *examined_rows)
Definition: sorting_iterator.cc:400
Sort_result m_sort_result
Definition: sorting_iterator.h:126
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
Definition: sorting_iterator.h:139
IteratorHolder()
Definition: sorting_iterator.h:140
SortFileIterator< false > sort_file
Definition: sorting_iterator.h:147
SortFileIndirectIterator sort_file_indirect
Definition: sorting_iterator.h:148
SortBufferIterator< false > sort_buffer
Definition: sorting_iterator.h:144
SortFileIterator< true > sort_file_packed_addons
Definition: sorting_iterator.h:146
SortBufferIterator< true > sort_buffer_packed_addons
Definition: sorting_iterator.h:143
SortBufferIndirectIterator sort_buffer_indirect
Definition: sorting_iterator.h:145
~IteratorHolder()
Definition: sorting_iterator.h:141