MySQL 9.6.0
Source Code Documentation
Bulk_load::Row_id_context Struct Reference

Contains the data needed for the ROW_ID generation for tables without explicit primary key. More...

#include <bulk_data_service.h>

Public Member Functions

size_t get_rows_per_thread () const
 Get an estimate of the number of rows to be handled by each thread. More...
 
std::pair< uint64_t, uint64_t > get_next_rowid_range () const
 Get the next available range for generating DB_ROW_ID. More...
 
void set_begin_rowid_value (size_t row_id)
 

Public Attributes

size_t m_total_size
 
std::atomic< size_t > m_avg_row_len
 
size_t m_n_loaders
 

Private Attributes

std::mutex m_rowid_mutex
 Protects the member m_next_rowid_range. More...
 
size_t m_next_rowid_range {0}
 

Detailed Description

Contains the data needed for the ROW_ID generation for tables without explicit primary key.

Member Function Documentation

◆ get_next_rowid_range()

std::pair< uint64_t, uint64_t > Bulk_load::Row_id_context::get_next_rowid_range ( ) const
inline

Get the next available range for generating DB_ROW_ID.

The range includes the begin value but excludes the end value.

Returns
the range for row ids for exclusive use by the calling thread.

◆ get_rows_per_thread()

size_t Bulk_load::Row_id_context::get_rows_per_thread ( ) const
inline

Get an estimate of the number of rows to be handled by each thread.

This will give the number of row ids to be generated by each thread.

Returns
number of rows to be handled by each thread.

◆ set_begin_rowid_value()

void Bulk_load::Row_id_context::set_begin_rowid_value ( size_t  row_id)
inline

Member Data Documentation

◆ m_avg_row_len

std::atomic<size_t> Bulk_load::Row_id_context::m_avg_row_len

◆ m_n_loaders

size_t Bulk_load::Row_id_context::m_n_loaders

◆ m_next_rowid_range

size_t Bulk_load::Row_id_context::m_next_rowid_range {0}
mutableprivate

◆ m_rowid_mutex

std::mutex Bulk_load::Row_id_context::m_rowid_mutex
mutableprivate

Protects the member m_next_rowid_range.

◆ m_total_size

size_t Bulk_load::Row_id_context::m_total_size

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