MySQL 9.1.0
Source Code Documentation
|
Insert or write the compressed BLOB as a single zlib stream. More...
#include <lob0zip.h>
Public Member Functions | |
zInserter (InsertContext *ctx) | |
Constructor. More... | |
~zInserter () | |
Destructor. More... | |
dberr_t | prepare () |
Prepare to write a compressed BLOB. More... | |
dberr_t | write () |
Write all the BLOBs of the clustered index record. More... | |
dberr_t | write_one_blob (size_t blob_j) |
Write one blob field data. More... | |
dberr_t | finish (bool validate=true) |
Cleanup after completing the write of compressed BLOB. More... | |
void | log_page_type (page_t *blob_page, ulint nth_blob_page) |
Write the page type of the BLOB page and also generate the redo log record. More... | |
ulint | calc_total_pages () |
Calculate the total number of pages needed to store the given blobs. More... | |
int | write_into_single_page () |
Write contents into a single BLOB page. More... | |
void | commit_blob_mtr () |
Commit the BLOB mtr. More... | |
int | write_single_blob_page (big_rec_field_t &field, ulint nth_blob_page) |
Write one blob page. More... | |
int | write_first_page (big_rec_field_t &field) |
Write first blob page. More... | |
bool | validate_blobrefs () const |
Verify that all pointers to externally stored columns in the record is be valid. More... | |
void | update_length_in_blobref (big_rec_field_t &field) |
For the given blob field, update its length in the blob reference which is available in the clustered index record. More... | |
dberr_t | set_page_next () |
Make the current page as next page of previous page. More... | |
dberr_t | write_one_small_blob (size_t blob_j) |
Write one small blob field data. More... | |
Private Member Functions | |
void | add_to_blob_dir (const blob_page_info_t &page_info) |
Add the BLOB page information to the directory. More... | |
Private Member Functions inherited from lob::BaseInserter | |
BaseInserter (InsertContext *ctx) | |
Constructor. More... | |
mtr_t * | start_blob_mtr () |
Start the BLOB mtr. More... | |
buf_block_t * | alloc_blob_page () |
Allocate one BLOB page. More... | |
page_t * | get_previous_blob_page () |
Get the previous BLOB page frame. More... | |
buf_block_t * | get_previous_blob_block () |
Get the previous BLOB page block. More... | |
bool | is_index_sdi () |
Check if the index is SDI index. More... | |
page_t * | cur_page () const |
Get the current BLOB page frame. More... | |
Private Attributes | |
mem_heap_t * | m_heap |
z_stream | m_stream |
blob_dir_t | m_dir |
The BLOB directory information. More... | |
Private Attributes inherited from lob::BaseInserter | |
InsertContext * | m_ctx |
The BLOB operation context. More... | |
dberr_t | m_err |
Success or failure status of the operation so far. More... | |
mtr_t | m_blob_mtr |
The mini trx used to write into blob pages. More... | |
page_no_t | m_prev_page_no |
The previous BLOB page number. More... | |
buf_block_t * | m_cur_blob_block |
The current BLOB buf_block_t object. More... | |
page_no_t | m_cur_blob_page_no |
The current BLOB page number. More... | |
Insert or write the compressed BLOB as a single zlib stream.
|
inline |
Constructor.
[in] | ctx | blob operation context. |
|
inline |
Destructor.
|
inlineprivate |
Add the BLOB page information to the directory.
[in] | page_info | BLOB page information. |
|
inline |
Calculate the total number of pages needed to store the given blobs.
|
inline |
Commit the BLOB mtr.
|
inline |
Cleanup after completing the write of compressed BLOB.
[in] | validate | if true, validate all the lob references. if false, skip this validation. |
Write the page type of the BLOB page and also generate the redo log record.
[in] | blob_page | the BLOB page |
[in] | nth_blob_page | the count of BLOB page from the beginning of the BLOB. |
dberr_t lob::zInserter::prepare | ( | ) |
Prepare to write a compressed BLOB.
Setup the zlib compression stream.
dberr_t lob::zInserter::set_page_next | ( | ) |
Make the current page as next page of previous page.
In other words, make the page m_cur_blob_page_no as the next page (FIL_PAGE_NEXT) of page m_prev_page_no.
void lob::zInserter::update_length_in_blobref | ( | big_rec_field_t & | field | ) |
For the given blob field, update its length in the blob reference which is available in the clustered index record.
[in] | field | the concerned blob field. |
|
inline |
Verify that all pointers to externally stored columns in the record is be valid.
If validation fails, this function doesn't return.
dberr_t lob::zInserter::write | ( | ) |
Write all the BLOBs of the clustered index record.
int lob::zInserter::write_first_page | ( | big_rec_field_t & | field | ) |
Write first blob page.
[in] | field | the big record field. |
int lob::zInserter::write_into_single_page | ( | ) |
Write contents into a single BLOB page.
dberr_t lob::zInserter::write_one_blob | ( | size_t | blob_j | ) |
Write one blob field data.
[in] | blob_j | the blob field number |
dberr_t lob::zInserter::write_one_small_blob | ( | size_t | blob_j | ) |
Write one small blob field data.
Refer to ref_t to determine the definition of small blob.
[in] | blob_j | the blob field number |
int lob::zInserter::write_single_blob_page | ( | big_rec_field_t & | field, |
ulint | nth_blob_page | ||
) |
Write one blob page.
This function will be repeatedly called with an increasing nth_blob_page to completely write a BLOB.
[in] | field | the big record field. |
[in] | nth_blob_page | count of the BLOB page (starting from 1). |
|
private |
The BLOB directory information.
|
private |
|
private |