24#ifndef SQL_RANGE_OPTIMIZER_ROWID_ORDERED_RETRIEVAL_H_
25#define SQL_RANGE_OPTIMIZER_ROWID_ORDERED_RETRIEVAL_H_
177 bool Init()
override;
184 std::vector<RowIterator *, Malloc_allocator<RowIterator *>>,
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:426
Implements a priority queue using a vector-based max-heap.
Definition: priority_queue.h:104
An interface for RowIterators that have a given row ID, ie., they can be children in ROR (rowid-order...
Definition: rowid_capable_row_iterator.h:36
virtual uchar * last_rowid() const =0
Definition: rowid_ordered_retrieval.h:63
int Read() override
Read a single row.
Definition: rowid_ordered_retrieval.cc:323
bool init_ror_merged_scan()
Definition: rowid_ordered_retrieval.cc:170
const bool need_rows_in_rowid_order
Definition: rowid_ordered_retrieval.h:134
bool inited
Definition: rowid_ordered_retrieval.h:136
RowIDIntersectionIterator(THD *thd, MEM_ROOT *return_mem_root, TABLE *table_arg, bool retrieve_full_rows, bool need_rows_in_rowid_order, Mem_root_array< unique_ptr_destroy_only< RowIterator > > children, unique_ptr_destroy_only< RowIterator > cpk_child)
Definition: rowid_ordered_retrieval.cc:48
Mem_root_array< unique_ptr_destroy_only< RowIterator > > m_children
Definition: rowid_ordered_retrieval.h:84
uchar * m_last_rowid
Definition: rowid_ordered_retrieval.h:135
uchar * last_rowid() const override
Definition: rowid_ordered_retrieval.h:74
unique_ptr_destroy_only< RowIterator > m_cpk_child
Definition: rowid_ordered_retrieval.h:90
~RowIDIntersectionIterator() override
Definition: rowid_ordered_retrieval.cc:226
bool Init() override
Initialize or reinitialize the iterator.
Definition: rowid_ordered_retrieval.cc:199
bool retrieve_full_rows
Definition: rowid_ordered_retrieval.h:129
bool scans_inited
Definition: rowid_ordered_retrieval.h:132
Definition: rowid_ordered_retrieval.h:170
uchar * cur_rowid
Definition: rowid_ordered_retrieval.h:189
Priority_queue< RowIterator *, std::vector< RowIterator *, Malloc_allocator< RowIterator * > >, Quick_ror_union_less > queue
Definition: rowid_ordered_retrieval.h:186
uint rowid_length
Definition: rowid_ordered_retrieval.h:192
Mem_root_array< unique_ptr_destroy_only< RowIterator > > m_children
Definition: rowid_ordered_retrieval.h:181
RowIDUnionIterator(THD *thd, MEM_ROOT *return_mem_root, TABLE *table, Mem_root_array< unique_ptr_destroy_only< RowIterator > > children)
Definition: rowid_ordered_retrieval.cc:230
~RowIDUnionIterator() override
Definition: rowid_ordered_retrieval.cc:294
bool have_prev_rowid
Definition: rowid_ordered_retrieval.h:191
bool inited
Definition: rowid_ordered_retrieval.h:195
bool scans_inited
Definition: rowid_ordered_retrieval.h:194
uchar * prev_rowid
Definition: rowid_ordered_retrieval.h:190
int Read() override
Read a single row.
Definition: rowid_ordered_retrieval.cc:434
bool Init() override
Initialize or reinitialize the iterator.
Definition: rowid_ordered_retrieval.cc:242
MEM_ROOT * mem_root
Definition: rowid_ordered_retrieval.h:188
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
virtual RowIterator * real_iterator()
If this iterator is wrapping a different iterator (e.g.
Definition: row_iterator.h:224
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:167
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: row_iterator.h:234
TABLE * table() const
Definition: row_iterator.h:246
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4583
virtual int cmp_ref(const uchar *ref1, const uchar *ref2) const
Compare two positions.
Definition: handler.h:6167
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
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:52
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
Definition: my_bitmap.h:43
Definition: rowid_ordered_retrieval.h:145
const handler * m_file
Definition: rowid_ordered_retrieval.h:154
Quick_ror_union_less(const handler *file)
Definition: rowid_ordered_retrieval.h:146
bool operator()(RowIterator *a, RowIterator *b)
Definition: rowid_ordered_retrieval.h:147