![]() |
MySQL 9.5.0
Source Code Documentation
|
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_load * | alloc_first_page () |
| Allocate a LOB first page. More... | |
| Page_load * | alloc_data_page () |
| Allocate a data page. More... | |
| Page_load * | alloc_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_load * | alloc_page_from_extent (Page_extent *&m_page_extent) |
| Page_extent * | alloc_free_extent () |
Private Attributes | |
| Btree_load & | m_btree_load |
| Page_extent * | m_page_extent_first {nullptr} |
| Page extent from which to allocate first pages of blobs. More... | |
| Page_range_t | m_page_range_first |
| Page_extent * | m_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_load > | m_page_load_cache |
| Cache of Page_load objects. More... | |
| ut::Object_cache< Page_extent > | m_page_extent_cache |
| Cache of Page_extent objects. More... | |
| ut::unique_ptr< Blob_handle > | m_blob_handle |
| Only one blob handle per sub-tree. More... | |
Used to insert many blobs into InnoDB.
| Btree_multi::bulk::Blob_inserter::Blob_inserter | ( | Btree_load & | btree_load | ) |
Constructor.
| [in] | btree_load | the B-tree into which blobs are inserted. |
| Btree_multi::bulk::Blob_inserter::~Blob_inserter | ( | ) |
| Page_load * Btree_multi::bulk::Blob_inserter::alloc_data_page | ( | ) |
Allocate a data page.
| Page_load * Btree_multi::bulk::Blob_inserter::alloc_first_page | ( | ) |
Allocate a LOB first page.
|
private |
| Page_load * Btree_multi::bulk::Blob_inserter::alloc_index_page | ( | ) |
Allocate a LOB index page.
|
private |
| 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.
| [in] | blob_ctx | pointer to blob which has been completely written. |
| [out] | ref | a blob ref object. |
| void Btree_multi::bulk::Blob_inserter::finish | ( | ) |
|
inline |
Get the current transaction id.
| dberr_t Btree_multi::bulk::Blob_inserter::init | ( | void | ) |
Initialize by allocating necessary resources.
|
inline |
| dberr_t Btree_multi::bulk::Blob_inserter::open_blob | ( | Blob_context & | blob_ctx, |
| lob::ref_t & | ref | ||
| ) |
Create a blob.
| [out] | blob_ctx | pointer to an opaque object representing a blob. |
| [out] | ref | blob reference to be placed in the record. |
| 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.
| [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. |
|
private |
The current blob being inserted.
|
private |
Only one blob handle per sub-tree.
|
private |
|
private |
Page extent from which to allocate index pages of blobs.
|
private |
Cache of Page_extent objects.
|
private |
Page extent from which to allocate data pages of blobs.
|
private |
Page extent from which to allocate first pages of blobs.
|
private |
Cache of Page_load objects.
|
private |