#include <ddl0bulk.h>
|
| Loader (size_t num_threads) |
| Loader context constructor. More...
|
|
dberr_t | begin (const row_prebuilt_t *prebuilt, size_t data_size, size_t memory) |
| Prepare bulk loading by multiple threads. More...
|
|
dberr_t | load (const row_prebuilt_t *prebuilt, size_t thread_index, const Rows_mysql &rows, Bulk_load::Stat_callbacks &wait_cbk) |
| Load rows to a sub-tree by a thread. More...
|
|
dberr_t | open_blob (size_t thread_index, Blob_context &blob_ctx, lob::ref_t &ref) |
| Open a blob. More...
|
|
dberr_t | write_blob (size_t thread_index, Blob_context blob_ctx, lob::ref_t &ref, const byte *data, size_t len) |
| Write data into the blob. More...
|
|
dberr_t | close_blob (size_t thread_index, Blob_context blob_ctx, lob::ref_t &ref) |
| Indicate that the blob has been completed, so that resources can be removed, and as necessary flushing can be done. More...
|
|
dberr_t | end (const row_prebuilt_t *prebuilt, bool is_error) |
| Finish bulk load operation, combining the sub-trees produced by concurrent threads. More...
|
|
dberr_t | get_error () const |
|
std::string | get_error_string () const |
|
int | get_error_code () const |
| Get the client error code (e.g. More...
|
|
const char * | get_table_name () const |
|
const char * | get_index_name () const |
|
◆ Blob_context
◆ Btree_loads
◆ byte
◆ Thread_ctxs
◆ Loader()
ddl_bulk::Loader::Loader |
( |
size_t |
num_threads | ) |
|
|
inline |
Loader context constructor.
- Parameters
-
[in] | num_threads | Number of threads to use for bulk loading |
◆ begin()
Prepare bulk loading by multiple threads.
- Parameters
-
[in] | prebuilt | prebuilt structures from innodb table handler |
[in] | data_size | total data size to load in bytes |
[in] | memory | memory to be used from buffer pool |
- Returns
- innodb error code
◆ close_blob()
Indicate that the blob has been completed, so that resources can be removed, and as necessary flushing can be done.
- Parameters
-
[in] | thread_index | identifies the thread and the B-tree to use. |
[in] | blob_ctx | pointer to blob which has been completely written. |
[out] | ref | blob reference to be placed in the record. |
- Returns
- DB_SUCCESS on success or a failure error code.
◆ end()
Finish bulk load operation, combining the sub-trees produced by concurrent threads.
- Parameters
-
[in] | prebuilt | prebuilt structures from innodb table handler |
[in] | is_error | true if called for cleanup and rollback after an error |
- Returns
- innodb error code
◆ get_error()
dberr_t Loader::get_error |
( |
| ) |
const |
|
inline |
◆ get_error_code()
int Loader::get_error_code |
( |
| ) |
const |
|
inline |
Get the client error code (e.g.
ER_LOAD_BULK_DATA_UNSORTED).
- Returns
- the client error code.
◆ get_error_string()
std::string Loader::get_error_string |
( |
| ) |
const |
|
inline |
◆ get_index_name()
const char * ddl_bulk::Loader::get_index_name |
( |
| ) |
const |
|
inline |
- Returns
- index name where the data is being loaded.
◆ get_queue_size()
void Loader::get_queue_size |
( |
size_t |
memory, |
|
|
size_t & |
flush_queue_size, |
|
|
bool & |
allocate_in_pages |
|
) |
| const |
|
private |
Calculate the flush queue size to be used based on the available memory.
- Parameters
-
[in] | memory | total buffer pool memory to use |
[out] | flush_queue_size | calculated queue size |
[out] | allocate_in_pages | true if need to allocate in pages false if need to allocate in extents |
◆ get_table_name()
const char * ddl_bulk::Loader::get_table_name |
( |
| ) |
const |
|
inline |
- Returns
- table name where the data is being loaded.
◆ load()
Load rows to a sub-tree by a thread.
Called concurrently by multiple execution threads.
- Parameters
-
[in] | prebuilt | prebuilt structures from innodb table handler |
[in] | thread_index | identifies the thread and the B-tree to use. |
[in] | rows | rows to be loaded to the cluster index sub-tree |
[in] | wait_cbk | Stat callbacks |
- Returns
- innodb error code
◆ merge_subtrees()
Merge the sub-trees to build the cluster index.
- Parameters
-
[in] | prebuilt | prebuilt structures from innodb table handler |
- Returns
- innodb error code.
◆ open_blob()
Open a blob.
- Parameters
-
[in] | thread_index | identifies the thread and the B-tree to use. |
[out] | blob_ctx | pointer to an opaque object representing a blob. |
[out] | ref | blob reference to be placed in the record. |
- Returns
- DB_SUCCESS on success or a failure error code.
◆ write_blob()
Write data into the blob.
- Parameters
-
[in] | thread_index | identifies the thread and the B-tree to use. |
[in] | blob_ctx | pointer to blob into which data is written. |
[out] | ref | blob reference to be placed in the record. |
[in] | data | buffer containing data to be written |
[in] | len | length of the data to be written. |
- Returns
- DB_SUCCESS on success or a failure error code.
◆ m_ctxs
All thread specific data.
◆ m_extent_allocator
Allocator to extend tablespace and allocate extents.
◆ m_num_threads
size_t ddl_bulk::Loader::m_num_threads {} |
|
private |
Number of threads for bulk loading.
◆ m_sub_tree_loads
Sub-tree loading contexts.
◆ m_table
Innodb dictionary table object.
The documentation for this class was generated from the following files: