MySQL 8.3.0
Source Code Documentation
ddl::Parallel_cursor Struct Reference

Cursor used for parallel reads. More...

Inheritance diagram for ddl::Parallel_cursor:
[legend]

Public Member Functions

 Parallel_cursor (ddl::Context &ctx) noexcept
 Constructor. More...
 
 ~Parallel_cursor () noexcept override=default
 Destructor. More...
 
void open () noexcept override
 Open the cursor. More...
 
dict_index_tindex () noexcept override
 
dberr_t scan (Builders &builders) noexcept override
 Reads clustered index of the table and create temporary files containing the index entries for the indexes to be built. More...
 
virtual dberr_t copy_row (size_t thread_id, Row &row) noexcept override
 Copy the row data, by default only the pointers are copied. More...
 
virtual bool eof () const noexcept override
 
- Public Member Functions inherited from ddl::Cursor
 Cursor (ddl::Context &ctx) noexcept
 Constructor. More...
 
virtual ~Cursor () noexcept
 Destructor. More...
 
virtual dberr_t finish (dberr_t err) noexcept
 Do any post processing. More...
 
dberr_t setup_pk_sort (size_t n_uniq) noexcept
 Setup the primary key sort data structures. More...
 

Private Types

using Heaps = std::vector< mem_heap_t *, ut::allocator< mem_heap_t * > >
 

Private Attributes

bool m_eof {}
 If true then no more rows to scan. More...
 
Heaps m_heaps {}
 Heap per thread. More...
 
dict_index_tm_index {}
 Index to iterate over. More...
 
bool m_single_threaded_mode {}
 true if scan should be in single threaded mode. More...
 

Additional Inherited Members

- Public Types inherited from ddl::Cursor
using Post_row = std::function< dberr_t()>
 
- Static Public Member Functions inherited from ddl::Cursor
static Cursorcreate_cursor (ddl::Context &ctx) noexcept
 Create a cluster index scan cursor. More...
 
- Public Attributes inherited from ddl::Cursor
ddl::Contextm_ctx
 DDL context. More...
 
Scoped_heap m_row_heap {}
 Scoped heap to use for rows. More...
 
Scoped_heap m_tuple_heap {}
 Scoped heap to use for tuple instances. More...
 
dfield_tm_prev_fields {}
 Previous fields. More...
 

Detailed Description

Cursor used for parallel reads.

Member Typedef Documentation

◆ Heaps

using ddl::Parallel_cursor::Heaps = std::vector<mem_heap_t *, ut::allocator<mem_heap_t *> >
private

Constructor & Destructor Documentation

◆ Parallel_cursor()

ddl::Parallel_cursor::Parallel_cursor ( ddl::Context ctx)
inlineexplicitnoexcept

Constructor.

Parameters
[in,out]ctxDDL context.

◆ ~Parallel_cursor()

ddl::Parallel_cursor::~Parallel_cursor ( )
overridedefaultnoexcept

Destructor.

Member Function Documentation

◆ copy_row()

dberr_t ddl::Parallel_cursor::copy_row ( size_t  thread_id,
Row row 
)
overridevirtualnoexcept

Copy the row data, by default only the pointers are copied.

Parameters
[in]thread_idScan thread ID.
[in,out]rowRow to copy.
Returns
DB_SUCCESS or error code.

Implements ddl::Cursor.

◆ eof()

virtual bool ddl::Parallel_cursor::eof ( ) const
inlineoverridevirtualnoexcept
Returns
true if EOF reached.

Implements ddl::Cursor.

◆ index()

dict_index_t * ddl::Parallel_cursor::index ( )
inlineoverridevirtualnoexcept
Returns
the index being iterated over.

Implements ddl::Cursor.

◆ open()

void ddl::Parallel_cursor::open ( )
inlineoverridevirtualnoexcept

Open the cursor.

Implements ddl::Cursor.

◆ scan()

dberr_t ddl::Parallel_cursor::scan ( Builders builders)
overridevirtualnoexcept

Reads clustered index of the table and create temporary files containing the index entries for the indexes to be built.

Parameters
[in,out]buildersMerge buffers to use for reading.
Returns
DB_SUCCESS or error code.

Implements ddl::Cursor.

Member Data Documentation

◆ m_eof

bool ddl::Parallel_cursor::m_eof {}
private

If true then no more rows to scan.

◆ m_heaps

Heaps ddl::Parallel_cursor::m_heaps {}
private

Heap per thread.

◆ m_index

dict_index_t* ddl::Parallel_cursor::m_index {}
private

Index to iterate over.

◆ m_single_threaded_mode

bool ddl::Parallel_cursor::m_single_threaded_mode {}
private

true if scan should be in single threaded mode.


The documentation for this struct was generated from the following file: