MySQL 9.0.0
Source Code Documentation
|
An index entry pointing to an LOB page. More...
#include <lob0index.h>
Public Member Functions | |
index_entry_t (flst_node_t *node) | |
Constructor. More... | |
index_entry_t (flst_node_t *node, mtr_t *mtr) | |
index_entry_t (flst_node_t *node, mtr_t *mtr, dict_index_t *index) | |
index_entry_t (mtr_t *mtr, const dict_index_t *index) | |
void | reset (fil_addr_t &addr) |
buf_block_t * | get_block () const |
void | reset (flst_node_t *node) |
bool | is_null () const |
void | init () |
Initialize the object fully. More... | |
fil_addr_t | get_self () const |
Get the location of the current index entry. More... | |
void | set_versions_null () |
The versions base node is set to NULL. More... | |
bool | can_rollback (trx_id_t trxid, undo_no_t undo_no) |
Determine if the current index entry be rolled back. More... | |
bool | can_be_purged (trx_id_t trxid, undo_no_t undo_no) |
Determine if the current index entry be purged. More... | |
void | set_old_version (index_entry_t &entry) |
fil_addr_t | make_old_version_current (dict_index_t *index, first_page_t &first_page) |
The current index entry points to a latest LOB page. More... | |
fil_addr_t | purge_version (dict_index_t *index, flst_base_node_t *lst, flst_base_node_t *free_list) |
Purge the current entry. More... | |
void | add_version (index_entry_t &entry) const |
flst_base_node_t * | get_versions_list () const |
void | push_back (flst_base_node_t *bnode) |
Add this node as the last node in the given list. More... | |
flst_bnode_t | get_versions_mem () const |
Get the base node of the list of versions. More... | |
trx_id_t | get_trx_id () const |
trx_id_t | get_trx_id_modifier () const |
undo_no_t | get_trx_undo_no () const |
uint32_t | get_lob_version () const |
undo_no_t | get_trx_undo_no_modifier () const |
Get the undo number of the modifier trx. More... | |
fil_addr_t | get_next () const |
buf_block_t * | next () |
Make the current index entry object to point to the next index entry object. More... | |
fil_addr_t | get_prev () const |
Get the previous index entry. More... | |
void | set_trx_id_no_redo (trx_id_t id) |
Write the trx identifier to the index entry. More... | |
void | set_trx_id_modifier_no_redo (trx_id_t id) |
Write the modifier trx identifier to the index entry. More... | |
void | set_trx_id (trx_id_t id) |
void | set_trx_id_modifier (trx_id_t id) |
void | set_trx_undo_no (undo_no_t undo_no) |
void | set_lob_version (uint32_t version) |
Set the LOB version of this entry. More... | |
void | set_trx_undo_no_modifier (undo_no_t undo_no) |
void | set_page_no (page_no_t num) |
void | set_prev_null () |
void | set_next_null () |
page_no_t | get_page_no () const |
void | set_data_len (ulint len) |
ulint | get_data_len () const |
std::ostream & | print (std::ostream &out) const |
bool | is_same (const index_entry_t &that) |
void | read (index_entry_mem_t &entry_mem) const |
buf_block_t * | load_x (const fil_addr_t &addr) |
Load the index entry available in the given file address. More... | |
buf_block_t * | load_s (const fil_addr_t &addr) |
Load the index entry available in the given file address. More... | |
void | insert_after (flst_base_node_t *base, index_entry_t &entry) |
void | insert_before (flst_base_node_t *base, index_entry_t &entry) |
void | remove (flst_base_node_t *bnode) |
void | free_data_page (const page_no_t first_page_no) |
Free the data page pointed to by this index entry. More... | |
Static Public Attributes | |
static const ulint | OFFSET_PREV = 0 |
Index entry offsets within node. More... | |
static const ulint | OFFSET_NEXT = OFFSET_PREV + FIL_ADDR_SIZE |
static const ulint | OFFSET_VERSIONS = OFFSET_NEXT + FIL_ADDR_SIZE |
Points to base node of the list of versions. More... | |
static const ulint | OFFSET_TRXID = OFFSET_VERSIONS + FLST_BASE_NODE_SIZE |
The creator trx id. More... | |
static const ulint | OFFSET_TRXID_MODIFIER = OFFSET_TRXID + 6 |
The modifier trx id. More... | |
static const ulint | OFFSET_TRX_UNDO_NO = OFFSET_TRXID_MODIFIER + 6 |
static const ulint | OFFSET_TRX_UNDO_NO_MODIFIER = OFFSET_TRX_UNDO_NO + 4 |
The undo number of the modifier trx. More... | |
static const ulint | OFFSET_PAGE_NO = OFFSET_TRX_UNDO_NO_MODIFIER + 4 |
static const ulint | OFFSET_DATA_LEN = OFFSET_PAGE_NO + 4 |
static const ulint | OFFSET_LOB_VERSION = OFFSET_DATA_LEN + 4 |
The LOB version number. More... | |
static const ulint | SIZE = OFFSET_LOB_VERSION + 4 |
Total length of an index node. More... | |
Protected Member Functions | |
byte * | get_versions_ptr () const |
Get pointer to the base node of the list of versions. More... | |
byte * | get_datalen_ptr () const |
Get the location where data length is stored. More... | |
byte * | get_trxid_ptr () const |
Get pointer to the location where the creator trx id is written. More... | |
byte * | get_trxid_modifier_ptr () const |
Get pointer to the location where the modifier trx id is written. More... | |
byte * | get_pageno_ptr () const |
Get pointer to location where page number is written. More... | |
byte * | get_trx_undo_no_ptr () const |
Get pointer to location where undo number of creator trx is written. More... | |
byte * | get_trx_undo_no_modifier_ptr () const |
Get pointer to location where undo number of modifier trx is written. More... | |
Protected Attributes | |
byte * | m_node {nullptr} |
Pointer to the blob index entry node. More... | |
Private Member Functions | |
void | move_version_base_node (index_entry_t &to_entry) |
Move the version base node from current entry to the given entry. More... | |
void | purge (dict_index_t *index) |
Purge the current index entry. More... | |
byte * | get_lob_version_ptr () const |
byte * | get_node_ptr () const |
byte * | get_node () const |
Private Attributes | |
mtr_t * | m_mtr |
const dict_index_t * | m_index |
buf_block_t * | m_block |
An index entry pointing to an LOB page.
|
inline |
Constructor.
[in] | node | the pointer where index entry is located. |
|
inline |
|
inline |
|
inline |
|
inline |
Determine if the current index entry be purged.
[in] | trxid | the transaction that is being purged. |
[in] | undo_no | the undo number of trx. |
Determine if the current index entry be rolled back.
[in] | trxid | the transaction that is being purged. |
[in] | undo_no | the undo number of trx. |
void lob::index_entry_t::free_data_page | ( | const page_no_t | first_page_no | ) |
Free the data page pointed to by this index entry.
The data page is available at offset OFFSET_PAGE_NO. After the page is freed, mark it as FIL_NULL. No other fields are modified. If the index entry points to the first page number of the LOB or if it is FIL_NULL, then this function is a no-op.
[in] | first_page_no | the first page number of the LOB. |
|
inline |
|
inline |
|
inlineprotected |
Get the location where data length is stored.
|
inline |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inlineprotected |
Get pointer to location where page number is written.
This page contains the LOB data.
|
inline |
Get the previous index entry.
fil_addr_t lob::index_entry_t::get_self | ( | ) | const |
Get the location of the current index entry.
|
inline |
|
inline |
|
inline |
|
inline |
Get the undo number of the modifier trx.
|
inlineprotected |
Get pointer to location where undo number of modifier trx is written.
|
inlineprotected |
Get pointer to location where undo number of creator trx is written.
|
inlineprotected |
Get pointer to the location where the modifier trx id is written.
|
inlineprotected |
Get pointer to the location where the creator trx id is written.
|
inline |
|
inline |
Get the base node of the list of versions.
|
inlineprotected |
Get pointer to the base node of the list of versions.
|
inline |
Initialize the object fully.
|
inline |
|
inline |
|
inline |
|
inline |
buf_block_t * lob::index_entry_t::load_s | ( | const fil_addr_t & | addr | ) |
Load the index entry available in the given file address.
Take s-latch on the index page.
[in] | addr | the file location of index entry. |
buf_block_t * lob::index_entry_t::load_x | ( | const fil_addr_t & | addr | ) |
Load the index entry available in the given file address.
Take x-latch on the index page.
[in] | addr | the file address of the index entry. |
fil_addr_t lob::index_entry_t::make_old_version_current | ( | dict_index_t * | index, |
first_page_t & | first_page | ||
) |
The current index entry points to a latest LOB page.
It may or may not have older versions. If older version is there, bring it back to the index list from the versions list. Then remove the current entry from the index list. Move the versions list from current entry to older entry.
[in] | index | the clustered index containing the LOB. |
[in] | first_page | The first lob page containing index list and free list. |
|
private |
Move the version base node from current entry to the given entry.
[in] | to_entry | The index entry to which the version base node is moved to. |
|
inline |
Make the current index entry object to point to the next index entry object.
std::ostream & lob::index_entry_t::print | ( | std::ostream & | out | ) | const |
|
private |
Purge the current index entry.
An index entry points to either a FIRST page or DATA page. That LOB page will be freed if it is DATA page. A FIRST page should not be freed.
fil_addr_t lob::index_entry_t::purge_version | ( | dict_index_t * | index, |
flst_base_node_t * | lst, | ||
flst_base_node_t * | free_list | ||
) |
Purge the current entry.
[in] | index | the clustered index containing the LOB. |
[in] | lst | the base node of index list. |
[in] | free_list | the base node of free list. |
|
inline |
Add this node as the last node in the given list.
[in] | bnode | the base node of the file list. |
void lob::index_entry_t::read | ( | index_entry_mem_t & | entry_mem | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Set the LOB version of this entry.
[in] | version | the LOB version number. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Write the modifier trx identifier to the index entry.
No redo log is generated for this modification. This is meant to be used during tablespace import.
[in] | id | the trx identifier. |
|
inline |
Write the trx identifier to the index entry.
No redo log is generated for this modification. This is meant to be used during tablespace import.
[in] | id | the trx identifier. |
|
inline |
|
inline |
|
inline |
The versions base node is set to NULL.
|
private |
|
private |
|
private |
|
static |
|
static |
The LOB version number.
|
static |
|
static |
|
static |
Index entry offsets within node.
|
static |
|
static |
The undo number of the modifier trx.
|
static |
The creator trx id.
|
static |
The modifier trx id.
|
static |
Points to base node of the list of versions.
The size of base node is 16 bytes.
|
static |
Total length of an index node.