#include <ddl0bulk.h>
 | 
|   | Loader (size_t num_threads, size_t keynr, const trx_t *trx) | 
|   | 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...
  | 
|   | 
| size_t  | get_keynr () const | 
|   | 
| 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 (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 | 
|   | 
 | 
| void  | set_sys_max_rowid (uint64_t max_rowid) | 
|   | Ensure that dict_sys->row_id is greater than max rowid used in bulk load of this table.  More...
  | 
|   | 
| dberr_t  | merge_subtrees () | 
|   | Merge the sub-trees to build the cluster index.  More...
  | 
|   | 
| void  | get_queue_size (size_t memory, size_t &flush_queue_size, bool &allocate_in_pages) const | 
|   | Calculate the flush queue size to be used based on the available memory.  More...
  | 
|   | 
◆ Blob_context
◆ Btree_loads
◆ byte
◆ Thread_ctxs
◆ Loader()
  
  
      
        
          | ddl_bulk::Loader::Loader  | 
          ( | 
          size_t  | 
          num_threads,  | 
         
        
           | 
           | 
          size_t  | 
          keynr,  | 
         
        
           | 
           | 
          const trx_t *  | 
          trx  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Loader context constructor. 
- Parameters
 - 
  
    | [in] | num_threads | Number of threads to use for bulk loading  | 
    | [in] | keynr | index number  | 
    | [in] | trx | transaction context.  | 
  
   
 
 
◆ 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()
      
        
          | dberr_t Loader::end  | 
          ( | 
          bool  | 
          is_error | ) | 
           | 
        
      
 
Finish bulk load operation, combining the sub-trees produced by concurrent threads. 
- Parameters
 - 
  
    | [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_keynr()
  
  
      
        
          | size_t ddl_bulk::Loader::get_keynr  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ 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. 
- 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. 
 
 
 
◆ set_sys_max_rowid()
  
  
      
        
          | void Loader::set_sys_max_rowid  | 
          ( | 
          uint64_t  | 
          max_rowid | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Ensure that dict_sys->row_id is greater than max rowid used in bulk load of this table. 
- Parameters
 - 
  
    | [in] | max_rowid | max rowid used in this table.  | 
  
   
 
 
◆ 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_gcol_mutex
  
  
      
        
          | std::mutex ddl_bulk::Loader::m_gcol_mutex | 
         
       
   | 
  
private   | 
  
 
 
◆ m_index
Index being loaded. 
Could be primary or secondary index. 
 
 
◆ m_keynr
  
  
      
        
          | const size_t ddl_bulk::Loader::m_keynr {} | 
         
       
   | 
  
private   | 
  
 
 
◆ m_num_threads
  
  
      
        
          | const size_t ddl_bulk::Loader::m_num_threads {} | 
         
       
   | 
  
private   | 
  
 
Number of threads for bulk loading. 
 
 
◆ m_queue_size
  
  
      
        
          | size_t ddl_bulk::Loader::m_queue_size | 
         
       
   | 
  
private   | 
  
 
Flush queue size used by the Bulk_flusher. 
 
 
◆ m_sub_tree_loads
Sub-tree loading contexts. 
 
 
◆ m_table
Innodb dictionary table object. 
 
 
◆ m_trx
  
  
      
        
          | const trx_t* const ddl_bulk::Loader::m_trx {} | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following files: