MySQL 8.4.2
Source Code Documentation
bulk_data_service.cc File Reference
#include "mysql/components/services/bulk_data_service.h"
#include <assert.h>
#include <cstdint>
#include "field_types.h"
#include "my_byteorder.h"
#include "my_time.h"
#include "mysql/components/service_implementation.h"
#include "mysql/components/services/log_builtins.h"
#include "mysql_time.h"
#include "mysqld_error.h"
#include "sql-common/my_decimal.h"
#include "sql/field.h"
#include "sql/sql_class.h"
#include "sql/sql_gipk.h"
#include "sql/sql_time.h"
#include "sql/tztime.h"

Classes

class  Bulk_data_convert::Row_header
 

Namespaces

namespace  Bulk_data_convert
 
namespace  Bulk_data_load
 

Functions

static void Bulk_data_convert::log_conversion_error (const Column_text &text_col, std::string mesg)
 Log details of error during data conversion. More...
 
template<typename S , typename U >
static int Bulk_data_convert::format_int_column (const Column_text &text_col, const CHARSET_INFO *charset, const Field *field, bool write_in_buffer, Column_mysql &sql_col, Bulk_load_error_location_details &error_details)
 Create an integer column converting data from CSV text. More...
 
static int Bulk_data_convert::format_char_column (const Column_text &text_col, const CHARSET_INFO *charset, const Field *field, bool write_length, const Column_meta &col_meta, bool single_byte, Column_mysql &sql_col, size_t &length_size, Bulk_load_error_location_details &error_details)
 Create a char/varchar column converting data to MySQL storage format. More...
 
static int Bulk_data_convert::format_float_column (const Column_text &text_col, const CHARSET_INFO *charset, const Field *field, Column_mysql &sql_col, Bulk_load_error_location_details &error_details)
 Create a FLOAT column converting data to MySQL storage format. More...
 
static int Bulk_data_convert::format_double_column (const Column_text &text_col, const CHARSET_INFO *charset, const Field *field, Column_mysql &sql_col, Bulk_load_error_location_details &error_details)
 Create a DOUBLE column converting data to MySQL storage format. More...
 
static int Bulk_data_convert::format_decimal_column (const Column_text &text_col, const CHARSET_INFO *charset, const Field *field, Column_mysql &sql_col, Bulk_load_error_location_details &error_details)
 Create a DECIMAL column converting data to MySQL storage format. More...
 
static int Bulk_data_convert::format_datetime_column (THD *thd, const Column_text &text_col, const CHARSET_INFO *charset, const Field *field, Column_mysql &sql_col, Bulk_load_error_location_details &error_details)
 Create a DATETIME column converting data to MySQL storage format. More...
 
static int Bulk_data_convert::format_date_column (THD *thd, const Column_text &text_col, const CHARSET_INFO *charset, const Field *field, Column_mysql &sql_col, Bulk_load_error_location_details &error_details)
 Create a DATE column converting data to MySQL storage format. More...
 
static int Bulk_data_convert::format_time_column (THD *thd, const Column_text &text_col, const CHARSET_INFO *charset, const Field *field, Column_mysql &sql_col, Bulk_load_error_location_details &error_details)
 Create a TIME column converting data to MySQL storage format. More...
 
static int Bulk_data_convert::format_row (THD *thd, const TABLE_SHARE *table_share, const Rows_text &text_rows, size_t text_row_index, char *&buffer, size_t &buffer_length, const CHARSET_INFO *charset, const Row_meta &metadata, Rows_mysql &sql_rows, size_t sql_row_index, bool single_byte_char, bool &completed, Bulk_load_error_location_details &error_details)
 Create a row in converting column data to MySQL storage format. More...
 
static int Bulk_data_convert::fill_column_data (char *buffer, size_t buffer_length, const Column_meta &col_meta, const Row_header &header, bool marked_fixed, size_t &col_length, Column_mysql &sql_col)
 Fill data in column from raw format. More...
 
static int Bulk_data_convert::fill_row_data (char *buffer, size_t buffer_length, bool fill_keys, const Row_meta &metadata, Row_header &header, Rows_mysql &sql_rows, size_t row_num, size_t &row_length)
 Fill data in row from raw format. More...
 
int 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) noexcept
 
int 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) noexcept
 
int 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) noexcept
 
bool Bulk_data_convert::is_killed (THD *thd) noexcept
 
int Bulk_data_convert::compare_keys (const Column_mysql &key1, const Column_mysql &key2, const Column_meta &col_meta) noexcept
 
static void Bulk_data_convert::set_data_type (const Field *field, Column_meta &col_meta)
 Fill column metadata type related information from mysql field structure. More...
 
static void Bulk_data_convert::fill_column_metadata (const Field *field, Column_meta &col_meta)
 Fill column metadata from mysql field structure. More...
 
bool Bulk_data_convert::get_row_metadata (THD *, const TABLE *table, bool have_key, Row_meta &metadata) noexcept
 
void * Bulk_data_load::begin (THD *thd, const TABLE *table, size_t data_size, size_t memory, size_t num_threads) noexcept
 
bool Bulk_data_load::load (THD *thd, void *ctx, const TABLE *table, const Rows_mysql &sql_rows, size_t thread, Bulk_load::Stat_callbacks &wait_cbks) noexcept
 
bool Bulk_data_load::end (THD *thd, void *ctx, const TABLE *table, bool error) noexcept
 
bool Bulk_data_load::check_for_deprecated_use (Field_float *field)
 
bool Bulk_data_load::check_for_deprecated_use (Field_double *field)
 
bool Bulk_data_load::check_for_deprecated_use (Field_new_decimal *field)
 
bool Bulk_data_load::check_for_deprecated_use (Field *field)
 
size_t Bulk_data_load::get_se_memory_size (THD *thd, const TABLE *table) noexcept
 
bool Bulk_data_load::is_table_supported (THD *thd, const TABLE *table) noexcept