23#ifndef SQL_RANGE_OPTIMIZER_ROWID_ORDERED_RETRIEVAL_H_
24#define SQL_RANGE_OPTIMIZER_ROWID_ORDERED_RETRIEVAL_H_
176 bool Init()
override;
183 std::vector<RowIterator *, Malloc_allocator<RowIterator *>>,
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:425
Implements a priority queue using a vector-based max-heap.
Definition: priority_queue.h:103
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:35
virtual uchar * last_rowid() const =0
Definition: rowid_ordered_retrieval.h:62
int Read() override
Read a single row.
Definition: rowid_ordered_retrieval.cc:321
bool init_ror_merged_scan()
Definition: rowid_ordered_retrieval.cc:168
const bool need_rows_in_rowid_order
Definition: rowid_ordered_retrieval.h:133
bool inited
Definition: rowid_ordered_retrieval.h:135
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:46
Mem_root_array< unique_ptr_destroy_only< RowIterator > > m_children
Definition: rowid_ordered_retrieval.h:83
uchar * m_last_rowid
Definition: rowid_ordered_retrieval.h:134
uchar * last_rowid() const override
Definition: rowid_ordered_retrieval.h:73
unique_ptr_destroy_only< RowIterator > m_cpk_child
Definition: rowid_ordered_retrieval.h:89
~RowIDIntersectionIterator() override
Definition: rowid_ordered_retrieval.cc:224
bool Init() override
Initialize or reinitialize the iterator.
Definition: rowid_ordered_retrieval.cc:197
bool retrieve_full_rows
Definition: rowid_ordered_retrieval.h:128
bool scans_inited
Definition: rowid_ordered_retrieval.h:131
Definition: rowid_ordered_retrieval.h:169
uchar * cur_rowid
Definition: rowid_ordered_retrieval.h:188
Priority_queue< RowIterator *, std::vector< RowIterator *, Malloc_allocator< RowIterator * > >, Quick_ror_union_less > queue
Definition: rowid_ordered_retrieval.h:185
uint rowid_length
Definition: rowid_ordered_retrieval.h:191
Mem_root_array< unique_ptr_destroy_only< RowIterator > > m_children
Definition: rowid_ordered_retrieval.h:180
RowIDUnionIterator(THD *thd, MEM_ROOT *return_mem_root, TABLE *table, Mem_root_array< unique_ptr_destroy_only< RowIterator > > children)
Definition: rowid_ordered_retrieval.cc:228
~RowIDUnionIterator() override
Definition: rowid_ordered_retrieval.cc:292
bool have_prev_rowid
Definition: rowid_ordered_retrieval.h:190
bool inited
Definition: rowid_ordered_retrieval.h:194
bool scans_inited
Definition: rowid_ordered_retrieval.h:193
uchar * prev_rowid
Definition: rowid_ordered_retrieval.h:189
int Read() override
Read a single row.
Definition: rowid_ordered_retrieval.cc:432
bool Init() override
Initialize or reinitialize the iterator.
Definition: rowid_ordered_retrieval.cc:240
MEM_ROOT * mem_root
Definition: rowid_ordered_retrieval.h:187
A context for reading through a single table using a chosen access method: index read,...
Definition: row_iterator.h:81
THD * thd() const
Definition: row_iterator.h:227
virtual RowIterator * real_iterator()
If this iterator is wrapping a different iterator (e.g.
Definition: row_iterator.h:223
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:166
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:33
Definition: row_iterator.h:233
TABLE * table() const
Definition: row_iterator.h:245
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4460
virtual int cmp_ref(const uchar *ref1, const uchar *ref2) const
Compare two positions.
Definition: handler.h:5938
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:488
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:51
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:82
Definition: my_bitmap.h:42
Definition: rowid_ordered_retrieval.h:144
const handler * m_file
Definition: rowid_ordered_retrieval.h:153
Quick_ror_union_less(const handler *file)
Definition: rowid_ordered_retrieval.h:145
bool operator()(RowIterator *a, RowIterator *b)
Definition: rowid_ordered_retrieval.h:146