MySQL 9.0.0
Source Code Documentation
|
An index entry pointing to one zlib stream. More...
#include <zlob0index.h>
Public Member Functions | |
z_index_entry_t (flst_node_t *node, mtr_t *mtr) | |
Constructor. More... | |
z_index_entry_t (flst_node_t *node, mtr_t *mtr, dict_index_t *index) | |
Constructor. More... | |
z_index_entry_t (mtr_t *mtr, dict_index_t *index) | |
Constructor. More... | |
z_index_entry_t (flst_node_t *node) | |
Constructor. More... | |
z_index_entry_t () | |
Default constructor. More... | |
void | set_index (dict_index_t *index) |
void | reset (flst_node_t *node) |
Point to another index entry. More... | |
void | reset (const z_index_entry_t &entry) |
Point to another index entry. More... | |
void | init () |
Initialize an index entry to some sane value. 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... | |
fil_addr_t | purge_version (dict_index_t *index, z_first_page_t &first, flst_base_node_t *lst, flst_base_node_t *free_list) |
Purge one index entry. More... | |
void | purge (dict_index_t *index, z_first_page_t &first) |
Purge the current index entry. More... | |
void | remove (flst_base_node_t *bnode) |
Remove this node from the given list. More... | |
void | insert_after (flst_base_node_t *base, z_index_entry_t &entry) |
Insert the given index entry after the current index entry. More... | |
void | insert_before (flst_base_node_t *base, z_index_entry_t &entry) |
void | push_back (flst_base_node_t *bnode) |
Add this node as the last node in the given list. More... | |
void | push_front (flst_base_node_t *bnode) |
Add this node as the last node in the given list. More... | |
void | set_prev_null () |
Set the previous index entry as null. More... | |
fil_addr_t | get_prev () const |
Get the location of previous index entry. More... | |
fil_addr_t | get_next () const |
Get the location of next index entry. More... | |
void | set_next_null () |
Set the next index entry as null. More... | |
void | set_versions_null () |
Set the versions list as null. More... | |
flst_base_node_t * | get_versions_list () const |
Get the base node of the list of versions. 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 |
Get the undo number of the creator transaction. More... | |
undo_no_t | get_trx_undo_no_modifier () const |
Get the undo number of the modifier transaction. More... | |
void | set_trx_id_no_redo (trx_id_t id) |
Set the trx identifier to given value, without generating redo log records. More... | |
void | set_trx_id (trx_id_t id) |
Set the trx identifier to given value. More... | |
void | set_trx_id_modifier (trx_id_t id) |
Set the modifier trxid to the given value. More... | |
void | set_trx_id_modifier_no_redo (trx_id_t id) |
Set the modifier trxid to the given value, without generating redo log records. More... | |
void | set_trx_undo_no (undo_no_t undo_no) |
Set the undo number of the creator trx. More... | |
void | set_trx_undo_no_modifier (undo_no_t undo_no) |
Set the undo number of the modifier trx. More... | |
page_no_t | get_z_page_no () const |
void | set_z_page_no_null (mtr_t *mtr) |
Set the page number pointed to by this index entry to FIL_NULL. More... | |
size_t | free_data_pages (mtr_t *mtr) |
Free the data pages pointed to by this index entry. More... | |
void | set_z_page_no (page_no_t page_no) |
Set the page number pointed to by this index entry to given value. More... | |
page_no_t | get_z_frag_id () const |
void | set_z_frag_id (frag_id_t id) |
ulint | get_data_len () const |
Get the uncompressed data length in bytes. More... | |
void | set_data_len (ulint len) |
Set the uncompressed data length in bytes. More... | |
ulint | get_zdata_len () const |
Get the compressed data length in bytes. More... | |
void | set_zdata_len (ulint len) |
Set the compressed data length in bytes. More... | |
uint32_t | get_lob_version () const |
Get the LOB version. More... | |
void | set_lob_version (ulint version) |
Set the LOB version . More... | |
void | set_old_version (z_index_entry_t &entry) |
fil_addr_t | make_old_version_current (dict_index_t *index, z_first_page_t &first) |
The current index entry points to a latest LOB page. More... | |
flst_node_t * | get_node () |
bool | is_null () const |
std::ostream & | print (std::ostream &out) const |
std::ostream & | print_pages (std::ostream &out) const |
buf_block_t * | load_s () |
Load the page (in shared mode) whose number was cached. More... | |
void | load_s (fil_addr_t &addr) |
Load the given file address in s mode. More... | |
void | load_x (fil_addr_t &addr) |
Load the given file address in x mode. More... | |
void | read (z_index_entry_mem_t &entry_mem) const |
Read the given LOB index entry. More... | |
void | read_and_commit (z_index_entry_mem_t &entry_mem) |
Read the given LOB index entry and then commit the mtr. More... | |
fil_addr_t | get_self () const |
Get the location of the current index entry. More... | |
Static Public Attributes | |
static const ulint | OFFSET_PREV = 0 |
Offset with index entry pointing to the prev index entry. More... | |
static const ulint | OFFSET_NEXT = OFFSET_PREV + FIL_ADDR_SIZE |
Offset with index entry pointing to the next index entry. More... | |
static const ulint | OFFSET_VERSIONS = OFFSET_NEXT + FIL_ADDR_SIZE |
Offset within index entry pointing to base node of list of versions. More... | |
static const ulint | OFFSET_TRXID = OFFSET_VERSIONS + FLST_BASE_NODE_SIZE |
Offset within index entry pointing to creator trxid. 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 |
Offset within index entry pointing to trx undo no. More... | |
static const ulint | OFFSET_TRX_UNDO_NO_MODIFIER = OFFSET_TRX_UNDO_NO + 4 |
Offset within index entry pointing to modifier trx undo no. More... | |
static const ulint | OFFSET_Z_PAGE_NO = OFFSET_TRX_UNDO_NO_MODIFIER + 4 |
Offset within index entry pointing to page number where zlib stream starts. More... | |
static const ulint | OFFSET_Z_FRAG_ID = OFFSET_Z_PAGE_NO + 4 |
Offset within index entry pointing to location of zlib stream. More... | |
static const ulint | OFFSET_DATA_LEN = OFFSET_Z_FRAG_ID + 2 |
Offset within index entry pointing to uncompressed data len (bytes). More... | |
static const ulint | OFFSET_ZDATA_LEN = OFFSET_DATA_LEN + 4 |
Offset within index entry pointing to compressed data len (bytes). More... | |
static const ulint | OFFSET_LOB_VERSION = OFFSET_ZDATA_LEN + 4 |
LOB version. More... | |
static const ulint | SIZE = OFFSET_LOB_VERSION + 4 |
Total size of one index entry. More... | |
Private Member Functions | |
void | move_version_base_node (z_index_entry_t &entry) |
Move the version base node from current entry to the given entry. More... | |
Private Attributes | |
flst_node_t * | m_node |
The file list node in a db page. More... | |
mtr_t * | m_mtr |
A mini-transaction. More... | |
dict_index_t * | m_index |
The index containing the LOB. More... | |
buf_block_t * | m_block |
The buffer block in which this entry exists. More... | |
page_no_t | m_page_no |
The page number in which this entry is available. More... | |
An index entry pointing to one zlib stream.
|
inline |
Constructor.
|
inline |
Constructor.
|
inline |
Constructor.
[in] | mtr | the mini-transaction |
[in] | index | the clustered index to which LOB belongs. |
|
inline |
Constructor.
[in] | node | the location where index entry starts. |
|
inline |
Default constructor.
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 rolled back. |
[in] | undo_no | the savepoint undo number of trx, up to which rollback happens. |
size_t lob::z_index_entry_t::free_data_pages | ( | mtr_t * | mtr | ) |
Free the data pages pointed to by this index entry.
[in] | mtr | the mini-transaction used to free the pages. |
|
inline |
Get the uncompressed data length in bytes.
|
inline |
Get the LOB version.
|
inline |
Get the location of next index entry.
|
inline |
|
inline |
Get the location of previous index entry.
fil_addr_t lob::z_index_entry_t::get_self | ( | ) | const |
Get the location of the current index entry.
|
inline |
|
inline |
|
inline |
Get the undo number of the creator transaction.
This is used for rollback purposes.
|
inline |
Get the undo number of the modifier transaction.
This is used for purging purposes.
|
inline |
Get the base node of the list of versions.
|
inline |
Get the base node of the list of versions.
|
inline |
|
inline |
|
inline |
Get the compressed data length in bytes.
|
inline |
Initialize an index entry to some sane value.
|
inline |
Insert the given index entry after the current index entry.
[in] | base | the base node of the file based list. |
[in] | entry | the new node to be inserted. |
|
inline |
|
inline |
|
inline |
Load the page (in shared mode) whose number was cached.
|
inline |
Load the given file address in s mode.
[in] | addr | the file address of the required node. |
|
inline |
Load the given file address in x mode.
[in] | addr | the file address of the required node. |
fil_addr_t lob::z_index_entry_t::make_old_version_current | ( | dict_index_t * | index, |
z_first_page_t & | first | ||
) |
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 index in which LOB exists. |
[in] | first | The first lob page containing index list and free list. |
|
private |
Move the version base node from current entry to the given entry.
[in] | entry | The index entry to which the version base node is moved to. |
std::ostream & lob::z_index_entry_t::print | ( | std::ostream & | out | ) | const |
std::ostream & lob::z_index_entry_t::print_pages | ( | std::ostream & | out | ) | const |
void lob::z_index_entry_t::purge | ( | dict_index_t * | index, |
z_first_page_t & | first | ||
) |
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::z_index_entry_t::purge_version | ( | dict_index_t * | index, |
z_first_page_t & | first, | ||
flst_base_node_t * | lst, | ||
flst_base_node_t * | free_list | ||
) |
Purge one index entry.
[in] | index | index to which LOB belongs. |
[in] | first | first page of LOB. |
[in,out] | lst | list from which this entry will be removed. |
[in,out] | free_list | list to which this entry will be added. |
|
inline |
Add this node as the last node in the given list.
[in] | bnode | the base node of the file list. |
|
inline |
Add this node as the last node in the given list.
[in] | bnode | the base node of the file list. |
void lob::z_index_entry_t::read | ( | z_index_entry_mem_t & | entry_mem | ) | const |
Read the given LOB index entry.
[in] | entry_mem | the LOB index entry. |
|
inline |
Read the given LOB index entry and then commit the mtr.
[in] | entry_mem | the LOB index entry. |
|
inline |
Remove this node from the given list.
[in] | bnode | the base node of the list from which to remove current node. |
|
inline |
Point to another index entry.
[in] | entry | another index entry. |
|
inline |
Point to another index entry.
[in] | node | point to this file list node. |
|
inline |
Set the uncompressed data length in bytes.
[in] | len | the uncompressed data length in bytes |
|
inline |
|
inline |
Set the LOB version .
[in] | version | the lob version. |
|
inline |
Set the next index entry as null.
void lob::z_index_entry_t::set_old_version | ( | z_index_entry_t & | entry | ) |
|
inline |
Set the previous index entry as null.
|
inline |
Set the trx identifier to given value.
[in] | id | the given trx identifier. |
|
inline |
Set the modifier trxid to the given value.
[in] | id | the modifier trxid. |
|
inline |
Set the modifier trxid to the given value, without generating redo log records.
[in] | id | the modifier trxid. |
|
inline |
Set the trx identifier to given value, without generating redo log records.
[in] | id | the given trx identifier. |
|
inline |
Set the undo number of the creator trx.
[in] | undo_no | the undo number value. |
|
inline |
Set the undo number of the modifier trx.
[in] | undo_no | the undo number value. |
|
inline |
Set the versions list as null.
|
inline |
|
inline |
Set the page number pointed to by this index entry to given value.
[in] | page_no | Page number to be put in index entry. |
|
inline |
Set the page number pointed to by this index entry to FIL_NULL.
[in] | mtr | The mini-transaction used for this modification. |
|
inline |
Set the compressed data length in bytes.
[in] | len | the compressed data length in bytes |
|
private |
The buffer block in which this entry exists.
While reading data from m_node, appropriate latches must be held on this block.
|
private |
The index containing the LOB.
|
private |
A mini-transaction.
|
private |
The file list node in a db page.
This node is persisted.
|
private |
The page number in which this entry is available.
This information will be cached and can be used to reload the page conveniently.
|
static |
Offset within index entry pointing to uncompressed data len (bytes).
|
static |
LOB version.
|
static |
Offset with index entry pointing to the next index entry.
|
static |
Offset with index entry pointing to the prev index entry.
|
static |
Offset within index entry pointing to trx undo no.
|
static |
Offset within index entry pointing to modifier trx undo no.
|
static |
Offset within index entry pointing to creator trxid.
|
static |
The modifier trx id.
|
static |
Offset within index entry pointing to base node of list of versions.
|
static |
Offset within index entry pointing to location of zlib stream.
|
static |
Offset within index entry pointing to page number where zlib stream starts.
This could be a data page or a fragment page.
|
static |
Offset within index entry pointing to compressed data len (bytes).
|
static |
Total size of one index entry.