MySQL 8.4.2
Source Code Documentation
s_mysql_bulk_data_convert Struct Reference

Bulk Data conversion. More...

#include <bulk_data_service.h>

Public Attributes

int(* mysql_format )(THD *thd, const TABLE *table, const Rows_text &text_rows, size_t &next_index, char *buffer, size_t &buffer_length, const CHARSET_INFO *charset, const Row_meta &metadata, Rows_mysql &sql_rows, Bulk_load_error_location_details &error_details)
 Convert row from text format for MySQL column format. More...
 
int(* mysql_format_from_raw )(char *buffer, size_t buffer_length, const Row_meta &metadata, size_t start_index, size_t &consumed_length, Rows_mysql &sql_rows)
 Convert row to MySQL column format from raw form. More...
 
int(* mysql_format_using_key )(const Row_meta &metadata, const Rows_mysql &sql_keys, size_t key_offset, Rows_mysql &sql_rows, size_t sql_index)
 Convert row to MySQL column format using the key. More...
 
bool(* is_killed )(THD *thd)
 Check if session is interrupted. More...
 
int(* compare_keys )(const Column_mysql &key1, const Column_mysql &key2, const Column_meta &col_meta)
 Compare two key columns. More...
 
bool(* get_row_metadata )(THD *thd, const TABLE *table, bool have_key, Row_meta &metadata)
 Get Table row metadata. More...
 

Detailed Description

Bulk Data conversion.

Member Data Documentation

◆ compare_keys

int(* s_mysql_bulk_data_convert::compare_keys) (const Column_mysql &key1, const Column_mysql &key2, const Column_meta &col_meta)

Compare two key columns.

Parameters
[in]key1first key
[in]key2second key
[in]col_metacolumn meta information
Returns
positive, 0, negative, if key_1 is greater, equal, less than key_2

◆ get_row_metadata

bool(* s_mysql_bulk_data_convert::get_row_metadata) (THD *thd, const TABLE *table, bool have_key, Row_meta &metadata)

Get Table row metadata.

Parameters
[in,out]thdsession THD
[in]tableMySQL TABLE
[in]have_keyinclude Primary Key metadata
[out]metadataMetadata
Returns
true if successful.

◆ is_killed

bool(* s_mysql_bulk_data_convert::is_killed) (THD *thd)

Check if session is interrupted.

Parameters
[in,out]thdsession THD
Returns
true if connection or statement is killed.

◆ mysql_format

int(* s_mysql_bulk_data_convert::mysql_format) (THD *thd, const TABLE *table, const Rows_text &text_rows, size_t &next_index, char *buffer, size_t &buffer_length, const CHARSET_INFO *charset, const Row_meta &metadata, Rows_mysql &sql_rows, Bulk_load_error_location_details &error_details)

Convert row from text format for MySQL column format.

Convert as many rows as possible consuming the data buffer starting form next_index. On output next_index is the next row index that is not yet consumed. If it matches the size of input text_rows, then all rows are consumed.

Parameters
[in,out]thdsession THD
[in]tableMySQL TABLE
[in]text_rowsrows with column in text
[in,out]next_indexnext_index in text_rows to be processed
[in,out]bufferdata buffer for keeping sql row data
[in,out]buffer_lengthlength of the data buffer
[in]charsetinput row data character set
[in]metadatarow metadata
[out]sql_rowsrows with column in MySQL column format
Returns
error code.

◆ mysql_format_from_raw

int(* s_mysql_bulk_data_convert::mysql_format_from_raw) (char *buffer, size_t buffer_length, const Row_meta &metadata, size_t start_index, size_t &consumed_length, Rows_mysql &sql_rows)

Convert row to MySQL column format from raw form.

Parameters
[in,out]bufferinput raw data buffer
[in]buffer_lengthbuffer length
[in]metadatarow metadata
[in]start_indexstart row index in row bunch
[out]consumed_lengthlength of buffer consumed
[in,out]sql_rowsrow bunch to fill data
Returns
error code.

◆ mysql_format_using_key

int(* s_mysql_bulk_data_convert::mysql_format_using_key) (const Row_meta &metadata, const Rows_mysql &sql_keys, size_t key_offset, Rows_mysql &sql_rows, size_t sql_index)

Convert row to MySQL column format using the key.

Parameters
[in]metadatarow metadata
[in]sql_keysKey bunch
[in]key_offsetoffset for the key
[in,out]sql_rowsrow bunch to fill data
[in]sql_indexindex of the row to be filled
Returns
error code.

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