MySQL 9.1.0
Source Code Documentation
Btree_multi::bulk::Blob_inserter Class Reference

Used to insert many blobs into InnoDB. More...

#include <btr0mtib.h>

Public Member Functions

 Blob_inserter (Btree_load &btree_load)
 Constructor. More...
 
 ~Blob_inserter ()
 
dberr_t init ()
 Initialize by allocating necessary resources. More...
 
void finish ()
 
dberr_t insert_blob (lob::ref_t &ref, const dfield_t *dfield)
 
dberr_t open_blob (Blob_context &blob_ctx, lob::ref_t &ref)
 Create a blob. More...
 
dberr_t write_blob (Blob_context blob_ctx, lob::ref_t &ref, const byte *data, size_t len)
 Write data into the blob. More...
 
dberr_t close_blob (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...
 
Page_loadalloc_first_page ()
 Allocate a LOB first page. More...
 
Page_loadalloc_data_page ()
 Allocate a data page. More...
 
Page_loadalloc_index_page ()
 Allocate a LOB index page. More...
 
trx_id_t get_trx_id () const
 Get the current transaction id. More...
 

Private Member Functions

Page_loadalloc_page_from_extent (Page_extent *&m_page_extent)
 
Page_extentalloc_free_extent ()
 

Private Attributes

Btree_loadm_btree_load
 
Page_extentm_page_extent_first {nullptr}
 Page extent from which to allocate first pages of blobs. More...
 
Page_range_t m_page_range_first
 
Page_extentm_page_extent_data {nullptr}
 Page extent from which to allocate data pages of blobs. More...
 
std::list< Page_extent * > m_index_extents
 Page extent from which to allocate index pages of blobs. More...
 
Blob_context m_blob {nullptr}
 The current blob being inserted. More...
 
ut::Object_cache< Page_loadm_page_load_cache
 Cache of Page_load objects. More...
 
ut::Object_cache< Page_extentm_page_extent_cache
 Cache of Page_extent objects. More...
 
ut::unique_ptr< Blob_handlem_blob_handle
 Only one blob handle per sub-tree. More...
 

Detailed Description

Used to insert many blobs into InnoDB.

Constructor & Destructor Documentation

◆ Blob_inserter()

Btree_multi::bulk::Blob_inserter::Blob_inserter ( Btree_load btree_load)

Constructor.

Parameters
[in]btree_loadthe B-tree into which blobs are inserted.

◆ ~Blob_inserter()

Btree_multi::bulk::Blob_inserter::~Blob_inserter ( )

Member Function Documentation

◆ alloc_data_page()

Page_load * Btree_multi::bulk::Blob_inserter::alloc_data_page ( )

Allocate a data page.

Returns
a LOB data page.

◆ alloc_first_page()

Page_load * Btree_multi::bulk::Blob_inserter::alloc_first_page ( )

Allocate a LOB first page.

Returns
a LOB first page.

◆ alloc_free_extent()

Page_extent * Btree_multi::bulk::Blob_inserter::alloc_free_extent ( )
private

◆ alloc_index_page()

Page_load * Btree_multi::bulk::Blob_inserter::alloc_index_page ( )

Allocate a LOB index page.

Returns
a LOB index page.

◆ alloc_page_from_extent()

Page_load * Btree_multi::bulk::Blob_inserter::alloc_page_from_extent ( Page_extent *&  m_page_extent)
private

◆ close_blob()

dberr_t Btree_multi::bulk::Blob_inserter::close_blob ( 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.

Parameters
[in]blob_ctxpointer to blob which has been completely written.
[out]refa blob ref object.
Returns
DB_SUCCESS on success or a failure error code.

◆ finish()

void Btree_multi::bulk::Blob_inserter::finish ( )

◆ get_trx_id()

trx_id_t Btree_multi::bulk::Blob_inserter::get_trx_id ( ) const
inline

Get the current transaction id.

Returns
the current transaction id.

◆ init()

dberr_t Btree_multi::bulk::Blob_inserter::init ( void  )

Initialize by allocating necessary resources.

Returns
DB_SUCCESS on success or a failure error code.

◆ insert_blob()

dberr_t Btree_multi::bulk::Blob_inserter::insert_blob ( lob::ref_t ref,
const dfield_t dfield 
)
inline

◆ open_blob()

dberr_t Btree_multi::bulk::Blob_inserter::open_blob ( Blob_context blob_ctx,
lob::ref_t ref 
)

Create a blob.

Parameters
[out]blob_ctxpointer to an opaque object representing a blob.
[out]refblob reference to be placed in the record.
Returns
DB_SUCCESS on success or a failure error code.

◆ write_blob()

dberr_t Btree_multi::bulk::Blob_inserter::write_blob ( Blob_context  blob_ctx,
lob::ref_t ref,
const byte data,
size_t  len 
)

Write data into the blob.

Parameters
[in]blob_ctxpointer to blob into which data is written.
[out]refblob reference to be placed in the record.
[in]databuffer containing data to be written
[in]lenlength of the data to be written.
Returns
DB_SUCCESS on success or a failure error code.

Member Data Documentation

◆ m_blob

Blob_context Btree_multi::bulk::Blob_inserter::m_blob {nullptr}
private

The current blob being inserted.

◆ m_blob_handle

ut::unique_ptr<Blob_handle> Btree_multi::bulk::Blob_inserter::m_blob_handle
private

Only one blob handle per sub-tree.

◆ m_btree_load

Btree_load& Btree_multi::bulk::Blob_inserter::m_btree_load
private

◆ m_index_extents

std::list<Page_extent *> Btree_multi::bulk::Blob_inserter::m_index_extents
private

Page extent from which to allocate index pages of blobs.

lob::bulk::node_page_t.

◆ m_page_extent_cache

ut::Object_cache<Page_extent> Btree_multi::bulk::Blob_inserter::m_page_extent_cache
private

Cache of Page_extent objects.

◆ m_page_extent_data

Page_extent* Btree_multi::bulk::Blob_inserter::m_page_extent_data {nullptr}
private

Page extent from which to allocate data pages of blobs.

lob::bulk::data_page_t.

◆ m_page_extent_first

Page_extent* Btree_multi::bulk::Blob_inserter::m_page_extent_first {nullptr}
private

Page extent from which to allocate first pages of blobs.

lob::bulk::first_page_t.

◆ m_page_load_cache

ut::Object_cache<Page_load> Btree_multi::bulk::Blob_inserter::m_page_load_cache
private

Cache of Page_load objects.

◆ m_page_range_first

Page_range_t Btree_multi::bulk::Blob_inserter::m_page_range_first
private

The documentation for this class was generated from the following files: