MySQL 8.0.39
Source Code Documentation
ddl::RTree_inserter Class Reference

Class that caches RTree index tuples made from a single cluster index page scan, and then insert into corresponding index tree. More...

#include <ddl0impl-rtree.h>

Public Member Functions

 RTree_inserter (Context &ctx, dict_index_t *index) noexcept
 Constructor. More...
 
 ~RTree_inserter () noexcept
 Destructor. More...
 
bool is_initialized () noexcept
 
dict_index_tget_index () noexcept
 Get the index instance. More...
 
void add_to_batch (const dtuple_t *row, const row_ext_t *ext) noexcept
 Caches an index row into index tuple vector. More...
 
dberr_t batch_insert (trx_id_t trx_id, Latch_release &&latch_release) noexcept
 Insert the rows cached in the batch (m_dtuples). More...
 
void deep_copy_tuples () noexcept
 Deep copy the fields pointing to the clustered index record. More...
 

Private Types

using Tuples = std::vector< dtuple_t *, ut::allocator< dtuple_t * > >
 Cache index rows made from a cluster index scan. More...
 

Private Member Functions

void deep_copy_tuples (Tuples::iterator it) noexcept
 Deep copy the fields pointing to the clustered index record. More...
 

Private Attributes

Tuplesm_dtuples {}
 vector used to cache index rows made from cluster index scan More...
 
mem_heap_tm_dtuple_heap {}
 Memory heap for creating index tuples. More...
 
mem_heap_tm_dml_heap {}
 Memory heap for inserting the tuples. More...
 
dict_index_tm_index {}
 the index being built More...
 
Tuples::iterator m_iter {}
 Iterator to process m_dtuples. More...
 
Contextm_ctx
 DDL context. More...
 

Detailed Description

Class that caches RTree index tuples made from a single cluster index page scan, and then insert into corresponding index tree.

Member Typedef Documentation

◆ Tuples

using ddl::RTree_inserter::Tuples = std::vector<dtuple_t *, ut::allocator<dtuple_t *> >
private

Cache index rows made from a cluster index scan.

Usually for rows on single cluster index page

Constructor & Destructor Documentation

◆ RTree_inserter()

ddl::RTree_inserter::RTree_inserter ( Context ctx,
dict_index_t index 
)
noexcept

Constructor.

Parameters
[in,out]ctxDDL context.
[in]indexIndex to be created

◆ ~RTree_inserter()

ddl::RTree_inserter::~RTree_inserter ( )
noexcept

Destructor.

Member Function Documentation

◆ add_to_batch()

void ddl::RTree_inserter::add_to_batch ( const dtuple_t row,
const row_ext_t ext 
)
noexcept

Caches an index row into index tuple vector.

Parameters
[in]rowTable row
[in]extExternally stored column prefixes, or nullptr

◆ batch_insert()

dberr_t ddl::RTree_inserter::batch_insert ( trx_id_t  trx_id,
Latch_release &&  latch_release 
)
noexcept

Insert the rows cached in the batch (m_dtuples).

Parameters
[in]trx_idTransaction id.
[in,out]latch_releaseCalled when a log free check is required.
Returns
DB_SUCCESS if successful, else error number

◆ deep_copy_tuples() [1/2]

void ddl::RTree_inserter::deep_copy_tuples ( )
inlinenoexcept

Deep copy the fields pointing to the clustered index record.

◆ deep_copy_tuples() [2/2]

void ddl::RTree_inserter::deep_copy_tuples ( Tuples::iterator  it)
privatenoexcept

Deep copy the fields pointing to the clustered index record.

Parameters
[in]itDeep copy from this tuple onwards.

◆ get_index()

dict_index_t * ddl::RTree_inserter::get_index ( void  )
inlinenoexcept

Get the index instance.

Returns
the index instance.

◆ is_initialized()

bool ddl::RTree_inserter::is_initialized ( )
inlinenoexcept
Returns
true if initialization succeeded .

Member Data Documentation

◆ m_ctx

Context& ddl::RTree_inserter::m_ctx
private

DDL context.

◆ m_dml_heap

mem_heap_t* ddl::RTree_inserter::m_dml_heap {}
private

Memory heap for inserting the tuples.

◆ m_dtuple_heap

mem_heap_t* ddl::RTree_inserter::m_dtuple_heap {}
private

Memory heap for creating index tuples.

◆ m_dtuples

Tuples* ddl::RTree_inserter::m_dtuples {}
private

vector used to cache index rows made from cluster index scan

◆ m_index

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

the index being built

◆ m_iter

Tuples::iterator ddl::RTree_inserter::m_iter {}
private

Iterator to process m_dtuples.


The documentation for this class was generated from the following files: