MySQL 9.6.0
Source Code Documentation
ddl_bulk Namespace Reference

Classes

class  Loader
 

Functions

static dberr_t fill_tuple (dtuple_t *tuple, const row_prebuilt_t *prebuilt, const Rows_mysql &rows, size_t row_index, uint64_t &last_rowid, unsigned char *row_id_data, std::list< Btree_multi::Btree_load * > &subtrees, size_t queue_size, mem_heap_t *gcol_heap, bool &gcol_blobs_flushed)
 Fill the tuple to set the column data. More...
 
static dberr_t fill_tuple_up_to_n_cols (dtuple_t *tuple, const row_prebuilt_t *prebuilt, const Rows_mysql &rows, size_t row_index, size_t n_cols, uint64_t &last_rowid, unsigned char *row_id_data, std::list< Btree_multi::Btree_load * > &subtrees, size_t queue_size, bool allocate_subtree, mem_heap_t *gcol_heap, bool &gcol_blobs_flushed, bool validate_gcols)
 Fill the tuple to set the column data. More...
 
static void fill_system_columns (dtuple_t *entry, const row_prebuilt_t *prebuilt, unsigned char *trx_data, unsigned char *rollptr_data, unsigned char *row_id_data)
 Fill system columns for index entry to be loaded. More...
 
static void fill_index_entry (dtuple_t *entry, const dtuple_t *tuple, const row_prebuilt_t *prebuilt, unsigned char *trx_data, unsigned char *rollptr_data, unsigned char *row_id_data, bool fill_sys_cols=true)
 Fill he cluster index entry from tuple data. More...
 
static dberr_t setup_dfield (const row_prebuilt_t *prebuilt, Field *field, const Column_mysql &sql_col, dfield_t *src_dfield, dfield_t *dst_dfield)
 Sets up a dfield_t structure for a generated field based on src_dfield and user data in sql_col. More...
 
static bool store_int_col (const Column_mysql &col, byte *data_ptr, size_t &data_len)
 Store integer column in Innodb format. More...
 
static std::string print_int_field (dfield_t *field)
 
static std::string print_dfield_hex (const dfield_t *field)
 

Function Documentation

◆ fill_index_entry()

void ddl_bulk::fill_index_entry ( dtuple_t entry,
const dtuple_t tuple,
const row_prebuilt_t prebuilt,
unsigned char *  trx_data,
unsigned char *  rollptr_data,
unsigned char *  row_id_data,
bool  fill_sys_cols = true 
)
static

Fill he cluster index entry from tuple data.

Parameters
[in]entrytarget index entry to fill
[in]tuplesource tuple containing user field data
[in]prebuiltprebuilt structures from innodb table handler
[in]trx_datatransaction id buffer
[in]rollptr_dataroll_ptr buffer
[in]row_id_datarow_id buffer
[in]fill_sys_colsif the target index entry system columns should be filled.

◆ fill_system_columns()

void ddl_bulk::fill_system_columns ( dtuple_t entry,
const row_prebuilt_t prebuilt,
unsigned char *  trx_data,
unsigned char *  rollptr_data,
unsigned char *  row_id_data 
)
static

Fill system columns for index entry to be loaded.

Parameters
[in,out]entrythe target index entry tuple
[in]prebuiltprebuilt structures from innodb table handler,
[in]trx_datatransaction id buffer
[in]rollptr_dataroll_ptr buffer
[in]row_id_datarow_id buffer

◆ fill_tuple()

dberr_t ddl_bulk::fill_tuple ( dtuple_t tuple,
const row_prebuilt_t prebuilt,
const Rows_mysql rows,
size_t  row_index,
uint64_t &  last_rowid,
unsigned char *  row_id_data,
std::list< Btree_multi::Btree_load * > &  subtrees,
size_t  queue_size,
mem_heap_t gcol_heap,
bool &  gcol_blobs_flushed 
)
static

Fill the tuple to set the column data.

Parameters
[in]tupletarget tuple to fill
[in]prebuiltprebuilt structures from innodb table handler
[in]rowssql rows with column data
[in]row_indexcurrent row index
[in,out]last_rowidlast used row_id
[in]row_id_datarow_id buffer
[in,out]subtreeslist of subtree builds
[in]queue_sizethe write queue size used
[in]gcol_heapmemory heap used for generated columns
[in,out]gcol_blobs_flushedtrue if blobs are flushed, false otherwise. This is needed only when we have gcol on blobs.
Returns
innodb error code.

◆ fill_tuple_up_to_n_cols()

dberr_t ddl_bulk::fill_tuple_up_to_n_cols ( dtuple_t tuple,
const row_prebuilt_t prebuilt,
const Rows_mysql rows,
size_t  row_index,
size_t  n_cols,
uint64_t &  last_rowid,
unsigned char *  row_id_data,
std::list< Btree_multi::Btree_load * > &  subtrees,
size_t  queue_size,
bool  allocate_subtree,
mem_heap_t gcol_heap,
bool &  gcol_blobs_flushed,
bool  validate_gcols 
)
static

Fill the tuple to set the column data.

Parameters
[in]tupletarget tuple to fill
[in]prebuiltprebuilt structures from innodb table handler
[in]rowssql rows with column data
[in]row_indexcurrent row index
[in]n_colsnumber of columns in tuple to fill
[in,out]last_rowidlast used row_id
[in]row_id_datarow_id buffer
[in,out]subtreeslist of subtree builds
[in]queue_sizethe write queue size used
[in]allocate_subtreewhether to allocate subtrees, only set to true when filling data tuples, false when filling cmp and search tuples for existing table.
[in]gcol_heapmemory heap used for generated columns
[in,out]gcol_blobs_flushedtrue if blobs are flushed, false otherwise. This is needed only when we have gcol on blobs.
[in,out]validate_gcolswhether to validate gcols, false when building search and cmp tuples for existing table
Returns
innodb error code.

◆ print_dfield_hex()

static std::string ddl_bulk::print_dfield_hex ( const dfield_t field)
inlinestatic

◆ print_int_field()

static std::string ddl_bulk::print_int_field ( dfield_t field)
inlinestatic

◆ setup_dfield()

dberr_t ddl_bulk::setup_dfield ( const row_prebuilt_t prebuilt,
Field field,
const Column_mysql sql_col,
dfield_t src_dfield,
dfield_t dst_dfield 
)
static

Sets up a dfield_t structure for a generated field based on src_dfield and user data in sql_col.

Parameters
[in]prebuiltprebuilt structures from innodb table handler
[in]fieldfield metadata
[in]sql_colsql column with user data
[in]src_dfielddfield_t containing the computed gcol value
[out]dst_dfieldtarget dfield_t
Returns
innodb error code.

◆ store_int_col()

bool ddl_bulk::store_int_col ( const Column_mysql col,
byte data_ptr,
size_t &  data_len 
)
static

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.