MySQL 8.4.2
Source Code Documentation
ddl_bulk::Loader::Thread_data Class Reference

#include <ddl0bulk.h>

Public Member Functions

void init (const row_prebuilt_t *prebuilt)
 Initialize thread specific data. More...
 
dberr_t load (const row_prebuilt_t *prebuilt, Btree_multi::Btree_load *sub_tree, const Rows_mysql &rows, Bulk_load::Stat_callbacks &wait_cbk)
 Load rows to a sub-tree for a specific thread. More...
 
void free ()
 Free thread specific data. More...
 
dberr_t get_error () const
 
std::string get_error_string () const
 
int get_error_code () const
 Get the client error code (eg. More...
 

Private Member Functions

void fill_system_columns (const row_prebuilt_t *prebuilt)
 Fill system columns for index entry to be loaded. More...
 
dberr_t fill_tuple (const row_prebuilt_t *prebuilt, const Rows_mysql &rows, size_t row_index)
 Fill the tuple to set the column data. More...
 
void fill_index_entry (const row_prebuilt_t *prebuilt)
 Fill he cluster index entry from tuple data. More...
 
bool store_int_col (const Column_mysql &col, byte *data_ptr, size_t &data_len)
 Store integer column in Innodb format. More...
 

Private Attributes

mem_heap_tm_heap {}
 Heap for allocating tuple memory. More...
 
dtuple_tm_row {}
 Tuple for converting input data to table row. More...
 
dtuple_tm_entry {}
 Tuple for inserting row to cluster index. More...
 
unsigned char m_trx_data [DATA_TRX_ID_LEN]
 Column data for system column transaction ID. More...
 
unsigned char m_rollptr_data [DATA_ROLL_PTR_LEN]
 Column data for system column Roll pointer. More...
 
dberr_t m_err {DB_SUCCESS}
 Error code at thread level. More...
 
int m_errcode {0}
 
std::ostringstream m_sout
 

Member Function Documentation

◆ fill_index_entry()

void ddl_bulk::Loader::Thread_data::fill_index_entry ( const row_prebuilt_t prebuilt)
private

Fill he cluster index entry from tuple data.

Parameters
[in]prebuiltprebuilt structures from innodb table handler

◆ fill_system_columns()

void ddl_bulk::Loader::Thread_data::fill_system_columns ( const row_prebuilt_t prebuilt)
private

Fill system columns for index entry to be loaded.

Parameters
[in]prebuiltprebuilt structures from innodb table handler

◆ fill_tuple()

dberr_t ddl_bulk::Loader::Thread_data::fill_tuple ( const row_prebuilt_t prebuilt,
const Rows_mysql rows,
size_t  row_index 
)
private

Fill the tuple to set the column data.

Parameters
[in]prebuiltprebuilt structures from innodb table handler
[in]rowssql rows with column data
[in]row_indexcurrent row index
Returns
innodb error code.

◆ free()

void ddl_bulk::Loader::Thread_data::free ( )

Free thread specific data.

◆ get_error()

dberr_t ddl_bulk::Loader::Thread_data::get_error ( ) const
inline

◆ get_error_code()

int ddl_bulk::Loader::Thread_data::get_error_code ( ) const
inline

Get the client error code (eg.

ER_LOAD_BULK_DATA_UNSORTED).

Returns
the client error code.

◆ get_error_string()

std::string ddl_bulk::Loader::Thread_data::get_error_string ( ) const
inline

◆ init()

void ddl_bulk::Loader::Thread_data::init ( const row_prebuilt_t prebuilt)

Initialize thread specific data.

Parameters
[in]prebuiltprebuilt structures from innodb table handler

◆ load()

dberr_t ddl_bulk::Loader::Thread_data::load ( const row_prebuilt_t prebuilt,
Btree_multi::Btree_load sub_tree,
const Rows_mysql rows,
Bulk_load::Stat_callbacks wait_cbk 
)

Load rows to a sub-tree for a specific thread.

Parameters
[in]prebuiltprebuilt structures from innodb table handler
[in,out]sub_treesub tree to load data to
[in]rowsrows to be loaded to the cluster index sub-tree
[in]wait_cbkStat callbacks
Returns
innodb error code

◆ store_int_col()

bool ddl_bulk::Loader::Thread_data::store_int_col ( const Column_mysql col,
byte data_ptr,
size_t &  data_len 
)
private

Store integer column in Innodb format.

Parameters
[in]colsql column data
[in,out]data_ptrdata buffer for storing converted data
[in,out]data_lendata buffer length
Returns
true if successful.

Member Data Documentation

◆ m_entry

dtuple_t* ddl_bulk::Loader::Thread_data::m_entry {}
private

Tuple for inserting row to cluster index.

◆ m_err

dberr_t ddl_bulk::Loader::Thread_data::m_err {DB_SUCCESS}
private

Error code at thread level.

◆ m_errcode

int ddl_bulk::Loader::Thread_data::m_errcode {0}
private

◆ m_heap

mem_heap_t* ddl_bulk::Loader::Thread_data::m_heap {}
private

Heap for allocating tuple memory.

◆ m_rollptr_data

unsigned char ddl_bulk::Loader::Thread_data::m_rollptr_data[DATA_ROLL_PTR_LEN]
private

Column data for system column Roll pointer.

◆ m_row

dtuple_t* ddl_bulk::Loader::Thread_data::m_row {}
private

Tuple for converting input data to table row.

◆ m_sout

std::ostringstream ddl_bulk::Loader::Thread_data::m_sout
private

◆ m_trx_data

unsigned char ddl_bulk::Loader::Thread_data::m_trx_data[DATA_TRX_ID_LEN]
private

Column data for system column transaction ID.


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