85template <
typename Column_type>
102 template <
typename F>
110 template <
typename F>
116 if (!cbk(
m_columns[row_offset + index], last_col)) {
143 Column_type &
get_column(
size_t row_offset,
size_t col_index) {
145 assert(row_offset + col_index <
m_columns.size());
146 return m_columns[row_offset + col_index];
153 const Column_type &
read_column(
size_t row_offset,
size_t col_index)
const {
155 assert(row_offset + col_index <
m_columns.size());
156 return m_columns[row_offset + col_index];
165 if (n_rows > std::numeric_limits<uint32_t>::max() ||
351 size_t &next_index,
char *
buffer,
size_t &buffer_length,
366 size_t start_index,
size_t &consumed_length,
418 size_t num_threads));
Implements the row and column memory management for parse and load operations.
Definition: bulk_data_service.h:86
bool set_num_rows(size_t n_rows)
Set the number of rows.
Definition: bulk_data_service.h:163
std::vector< Column_type > m_columns
All the columns.
Definition: bulk_data_service.h:194
size_t get_next_row_offset(size_t &offset) const
Get next row offset from current row offset.
Definition: bulk_data_service.h:134
bool process_columns(size_t row_index, F &&cbk)
Process all columns, invoking callback for each.
Definition: bulk_data_service.h:103
bool process_columns_by_offset(size_t row_offset, F &&cbk)
Definition: bulk_data_service.h:111
size_t get_num_cols() const
Definition: bulk_data_service.h:96
size_t m_num_rows
Number of rows.
Definition: bulk_data_service.h:197
size_t get_row_offset(size_t row_index) const
Get current row offset to access columns.
Definition: bulk_data_service.h:126
size_t get_num_rows() const
Definition: bulk_data_service.h:93
const Column_type & read_column(size_t row_offset, size_t col_index) const
Get constant column for reading using row offset and column index.
Definition: bulk_data_service.h:153
Row_bunch(size_t n_cols)
Create a new row bunch.
Definition: bulk_data_service.h:90
static const size_t S_MAX_TOTAL_COLS
Limit allocation up to 600M columns.
Definition: bulk_data_service.h:190
size_t m_num_columns
Number of columns in each row.
Definition: bulk_data_service.h:200
Column_type & get_column(size_t row_offset, size_t col_index)
Get column using row offset and column index.
Definition: bulk_data_service.h:143
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
static uint16 key1[1001]
Definition: hp_test2.cc:50
void error(const char *format,...)
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) noexcept
Definition: bulk_data_service.cc:1160
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) noexcept
Definition: bulk_data_service.cc:1189
bool get_row_metadata(THD *, const TABLE *table, bool have_key, Row_meta &metadata) noexcept
Definition: bulk_data_service.cc:1392
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) noexcept
Definition: bulk_data_service.cc:1139
bool is_killed(THD *thd) noexcept
Definition: bulk_data_service.cc:1241
size_t get_se_memory_size(THD *thd, const TABLE *table) noexcept
Definition: bulk_data_service.cc:1633
bool is_table_supported(THD *thd, const TABLE *table) noexcept
Definition: bulk_data_service.cc:1637
Definition: bulk_data_service.h:321
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
const std::string charset("charset")
bool load(THD *, const dd::String_type &fname, dd::String_type *buf)
Read an sdi file from disk and store in a buffer.
Definition: sdi_file.cc:308
Definition: aligned_atomic.h:44
const char * begin(const char *const c)
Definition: base64.h:44
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:418
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
#define DECLARE_METHOD(retval, name, args)
Declares a method as a part of the Service definition.
Definition: service.h:103
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:91
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:86
Callbacks for collecting time statistics.
Definition: bulk_data_service.h:324
std::function< void()> m_fn_begin
Definition: bulk_data_service.h:326
std::function< void()> m_fn_end
Definition: bulk_data_service.h:328
Definition: bulk_data_service.h:45
std::string filename
Definition: bulk_data_service.h:46
size_t row_number
Definition: bulk_data_service.h:47
std::string column_input_data
Definition: bulk_data_service.h:50
std::string column_name
Definition: bulk_data_service.h:48
std::string column_type
Definition: bulk_data_service.h:49
Definition: m_ctype.h:423
Definition: bulk_data_service.h:61
uint64_t m_int_data
Column data in integer format.
Definition: bulk_data_service.h:75
bool m_is_null
If column is NULL.
Definition: bulk_data_service.h:69
char * m_data_ptr
Column data.
Definition: bulk_data_service.h:72
int16_t m_type
Column Data Type.
Definition: bulk_data_service.h:63
uint16_t m_data_len
Column data length.
Definition: bulk_data_service.h:66
Definition: bulk_data_service.h:53
const char * m_data_ptr
Column data.
Definition: bulk_data_service.h:55
size_t m_data_len
Column data length.
Definition: bulk_data_service.h:58