MySQL 8.0.40
Source Code Documentation
|
The B-tree context under which the LOB operation is done. More...
#include <lob0lob.h>
Public Member Functions | |
BtrContext () | |
Default Constructor. More... | |
BtrContext (mtr_t *mtr, dict_index_t *index, buf_block_t *block) | |
Constructor. More... | |
BtrContext (mtr_t *mtr, btr_pcur_t *pcur, dict_index_t *index, rec_t *rec, ulint *offsets, buf_block_t *block) | |
Constructor. More... | |
BtrContext (mtr_t *mtr, btr_pcur_t *pcur, dict_index_t *index, rec_t *rec, ulint *offsets, buf_block_t *block, opcode op) | |
Constructor. More... | |
BtrContext (const BtrContext &other) | |
Copy Constructor. More... | |
void | disown_inherited_fields (const upd_t *update) |
Marks non-updated off-page fields as disowned by this record. More... | |
void | set_ownership_of_extern_field (ulint i, bool val) |
Sets the ownership bit of an externally stored field in a record. More... | |
void | unmark_extern_fields () |
Marks all extern fields in a record as owned by the record. More... | |
void | free_externally_stored_fields (trx_id_t trx_id, undo_no_t undo_no, bool rollback, ulint rec_type, purge_node_t *node) |
Frees the externally stored fields for a record. More... | |
void | free_updated_extern_fields (trx_id_t trx_id, undo_no_t undo_no, const upd_t *update, bool rollback, big_rec_t *big_rec_vec) |
Frees the externally stored fields for a record, if the field is mentioned in the update vector. More... | |
page_zip_des_t * | get_page_zip () const |
Gets the compressed page descriptor. More... | |
page_no_t | get_page_no () const |
Get the page number of clustered index block. More... | |
ulint | get_rec_offset () const |
Get the record offset within page of the clustered index record. More... | |
bool | need_recalc () const |
Check if there is a need to recalculate the context information. More... | |
rec_t * | rec () const |
Get the clustered index record pointer. More... | |
byte * | get_field_ref (ulint field_no) const |
Get the LOB reference for the given field number. More... | |
bool | validate () const |
Validate the current BLOB context object. More... | |
bool | are_all_blobrefs_valid () const |
Check to see if all pointers to externally stored columns in the record must be valid. More... | |
bool | is_bulk () const |
Determine whether current operation is a bulk insert operation. More... | |
const page_t * | rec_frame () const |
Get the beginning of the B-tree clustered index page frame that contains the current clustered index record (m_rec). More... | |
void | commit_btr_mtr () |
Commit the mini-transaction that is holding the latches of the clustered index record block. More... | |
void | start_btr_mtr () |
Start the mini-transaction that will be holding the latches of the clustered index record block. More... | |
page_no_t | get_btr_page_no () const |
Get the page number of clustered index record. More... | |
void | rec_block_fix () |
Increment the buffer fix count of the clustered index record block. More... | |
void | rec_block_unfix () |
Decrement the buffer fix count of the clustered index record block, X-latching it before, so that the overall buffer_fix_count doesn't change. More... | |
void | restore_position () |
Restore the position of the persistent cursor. More... | |
dict_index_t * | index () const |
Get the index object. More... | |
dict_table_t * | table () const |
Get the table object. More... | |
space_id_t | space () const |
Get the space id. More... | |
const page_size_t | page_size () const |
Obtain the page size of the underlying table. More... | |
page_no_t | pages_in_extent () const |
Determine the extent size (in pages) for the underlying table. More... | |
void | check_redolog () |
Check if there is enough space in the redo log file. More... | |
void | make_nth_extern (ulint field_no) |
Mark the nth field as externally stored. More... | |
mtr_log_t | get_log_mode () |
Get the log mode of the btr mtr. More... | |
Flush_observer * | get_flush_observer () const |
Get flush observer. More... | |
ulint * | get_offsets () const |
Get the record offsets array. More... | |
bool | rec_offs_validate () const |
Validate the record offsets array. More... | |
mtr_t * | get_mtr () |
Get the associated mini-transaction. More... | |
buf_block_t * | block () const |
Get the pointer to the clustered record block. More... | |
void | store_position () |
Save the position of the persistent cursor. More... | |
void | check_redolog_normal () |
Check if there is enough space in log file. More... | |
void | check_redolog_bulk () |
When bulk load is being done, check if there is enough space in redo log file. More... | |
void | recalc () |
Recalculate some of the members after restoring the persistent cursor. More... | |
void | zblob_write_blobref (ulint field_no, mtr_t *mtr) |
Write a blob reference of a field into a clustered index record in a compressed leaf page. More... | |
Public Attributes | |
mtr_t * | m_mtr |
The btr mtr that is holding the latch on the B-tree index page containing the clustered index record. More... | |
btr_pcur_t * | m_pcur |
Persistent cursor positioned on the clustered index record. More... | |
dict_index_t * | m_index |
rec_t * | m_rec |
ulint * | m_offsets |
buf_block_t * | m_block |
opcode | m_op |
ulint | m_rec_offset |
Record offset within the page. More... | |
page_no_t | m_btr_page_no |
Page number where the clust rec is present. More... | |
The B-tree context under which the LOB operation is done.
|
inline |
Default Constructor.
|
inline |
Constructor.
|
inline |
Constructor.
|
inline |
Constructor.
|
inline |
Copy Constructor.
|
inline |
Check to see if all pointers to externally stored columns in the record must be valid.
|
inline |
Get the pointer to the clustered record block.
|
inline |
Check if there is enough space in the redo log file.
The btr mini-transaction will be restarted.
void lob::BtrContext::check_redolog_bulk | ( | ) |
When bulk load is being done, check if there is enough space in redo log file.
void lob::BtrContext::check_redolog_normal | ( | ) |
Check if there is enough space in log file.
Commit and re-start the mini-transaction.
|
inline |
Commit the mini-transaction that is holding the latches of the clustered index record block.
void lob::BtrContext::disown_inherited_fields | ( | const upd_t * | update | ) |
Marks non-updated off-page fields as disowned by this record.
The ownership must be transferred to the updated record which is inserted elsewhere in the index tree. In purge only the owner of externally stored field is allowed to free the field.
[in] | update | update vector. |
void lob::BtrContext::free_externally_stored_fields | ( | trx_id_t | trx_id, |
undo_no_t | undo_no, | ||
bool | rollback, | ||
ulint | rec_type, | ||
purge_node_t * | node | ||
) |
Frees the externally stored fields for a record.
[in] | trx_id | transaction identifier whose LOB is being freed. |
[in] | undo_no | undo number within a transaction whose LOB is being freed. |
[in] | rollback | performing rollback? |
[in] | rec_type | undo record type. |
[in] | node | purge node or nullptr |
void lob::BtrContext::free_updated_extern_fields | ( | trx_id_t | trx_id, |
undo_no_t | undo_no, | ||
const upd_t * | update, | ||
bool | rollback, | ||
big_rec_t * | big_rec_vec | ||
) |
Frees the externally stored fields for a record, if the field is mentioned in the update vector.
[in] | trx_id | the transaction identifier. |
[in] | undo_no | undo number within a transaction whose LOB is being freed. |
[in] | update | update vector |
[in] | rollback | performing rollback? |
[in] | big_rec_vec | big record vector |
|
inline |
Get the page number of clustered index record.
Get the LOB reference for the given field number.
[in] | field_no | field number. |
|
inline |
Get flush observer.
|
inline |
Get the log mode of the btr mtr.
|
inline |
Get the associated mini-transaction.
|
inline |
Get the record offsets array.
|
inline |
Get the page number of clustered index block.
|
inline |
Gets the compressed page descriptor.
|
inline |
Get the record offset within page of the clustered index record.
|
inline |
Get the index object.
|
inline |
Determine whether current operation is a bulk insert operation.
|
inline |
Mark the nth field as externally stored.
[in] | field_no | the field number. |
|
inline |
Check if there is a need to recalculate the context information.
|
inline |
Obtain the page size of the underlying table.
|
inline |
Determine the extent size (in pages) for the underlying table.
|
inline |
Get the clustered index record pointer.
|
inline |
Increment the buffer fix count of the clustered index record block.
This is to be called before commit_btr_mtr() which decrements the count when you want to prevent the block from being freed: rec_block_fix(); // buf_fix_count++ commit_btr_mtr(); // releasing mtr internally does buf_fix_count– start_btr_mtr(); rec_block_unfix(); // calls btr_block_get() which does buf_fix_count++ and then does buf_fix_count–
|
inline |
Decrement the buffer fix count of the clustered index record block, X-latching it before, so that the overall buffer_fix_count doesn't change.
This is done to restore X-latch on the page after mtr restart: rec_block_fix(); // buf_fix_count++ commit_btr_mtr(); // releasing mtr internally does buf_fix_count– start_btr_mtr(); rec_block_unfix(); // calls btr_block_get() which does buf_fix_count++ and then does buf_fix_count–
|
inline |
Get the beginning of the B-tree clustered index page frame that contains the current clustered index record (m_rec).
|
inline |
Validate the record offsets array.
|
inline |
Recalculate some of the members after restoring the persistent cursor.
|
inline |
Restore the position of the persistent cursor.
|
inline |
Sets the ownership bit of an externally stored field in a record.
[in] | i | field number |
[in] | val | value to set |
|
inline |
Get the space id.
|
inline |
Start the mini-transaction that will be holding the latches of the clustered index record block.
|
inline |
Save the position of the persistent cursor.
|
inline |
Get the table object.
|
inline |
Marks all extern fields in a record as owned by the record.
This function should be called if the delete mark of a record is removed: a not delete marked record always owns all its extern fields.
|
inline |
Validate the current BLOB context object.
The BLOB context object is valid if the necessary latches are being held by the mini-transaction of the B-tree (btr mtr). Does not return if the validation fails.
Write a blob reference of a field into a clustered index record in a compressed leaf page.
The information must already have been updated on the uncompressed page.
[in] | field_no | BLOB field number |
[in] | mtr | Mini-transaction to update blob page. |
buf_block_t* lob::BtrContext::m_block |
page_no_t lob::BtrContext::m_btr_page_no |
Page number where the clust rec is present.
dict_index_t* lob::BtrContext::m_index |
mtr_t* lob::BtrContext::m_mtr |
The btr mtr that is holding the latch on the B-tree index page containing the clustered index record.
ulint* lob::BtrContext::m_offsets |
opcode lob::BtrContext::m_op |
btr_pcur_t* lob::BtrContext::m_pcur |
Persistent cursor positioned on the clustered index record.
rec_t* lob::BtrContext::m_rec |
ulint lob::BtrContext::m_rec_offset |
Record offset within the page.