MySQL 8.0.40
Source Code Documentation
|
The fragment node represents one fragment. More...
#include <lob0impl.h>
Public Member Functions | |
frag_node_t (const plist_node_t &node, mtr_t *mtr) | |
Constructor. More... | |
frag_node_t (byte *frame, byte *ptr) | |
frag_node_t (byte *frame, byte *ptr, mtr_t *mtr) | |
Constructor. More... | |
frag_node_t (byte *frame, byte *ptr, ulint len, mtr_t *mtr) | |
Constructor. More... | |
byte * | frag_begin () const |
byte * | data_begin () const |
void | set_total_len (ulint len) |
void | incr_length_by_2 () |
Increment the total length of this fragment by 2 bytes. More... | |
void | decr_length_by_2 () |
Decrement the total length of this fragment by 2 bytes. More... | |
bool | is_before (const frag_node_t &frag) const |
void | set_frag_id_null () |
void | set_frag_id (ulint id) |
ulint | get_frag_id () const |
ulint | payload () const |
Get the space available in this fragment for storing data. More... | |
ulint | get_total_len () const |
Get the total length of this fragment, including its metadata. More... | |
paddr_t | addr () const |
Get the offset of the current fragment within page. More... | |
byte * | ptr () const |
Gets the pointer to the beginning of the current fragment. More... | |
byte * | end_ptr () const |
Gets the pointer just after the current fragment. More... | |
byte * | frame () const |
Get the page frame. More... | |
std::ostream & | print (std::ostream &out) const |
frag_node_t | get_next_frag () |
frag_node_t | get_next_node () |
frag_node_t | get_prev_node () |
frag_node_t | get_prev_frag () |
bool | merge (frag_node_t &next) |
Merge the current fragment node with the given next fragment node. More... | |
bool | is_null () const |
bool | is_equal (const frag_node_t &that) const |
bool | is_equal (const plist_node_t &node) const |
Static Public Member Functions | |
static ulint | overhead () |
Amount of space that will be used up by meta data. More... | |
static ulint | header_size () |
Only the header size. More... | |
Public Attributes | |
plist_node_t | m_node |
The page list node. More... | |
Static Public Attributes | |
static const ulint | OFFSET_LEN = plist_node_t::SIZE |
The offset where the length of fragment is stored. More... | |
static const ulint | OFFSET_FRAG_ID = OFFSET_LEN + 2 |
The offset where fragment id is stored. More... | |
static const ulint | OFFSET_DATA = OFFSET_FRAG_ID + 2 |
The offset where fragment data is stored. More... | |
static const ulint | SIZE_OF_PAGE_DIR_ENTRY = 2 |
The size of a page directory entry in a fragment page in bytes. More... | |
Private Attributes | |
mtr_t * | m_mtr |
The mini-transaction context. More... | |
The fragment node represents one fragment.
|
inline |
Constructor.
[in] | node | Page list node. |
[in] | mtr | Mini-transaction. |
Constructor.
[in] | frame | Page frame where the fragment node is located. |
[in] | ptr | Location of fragment node within page frame. |
[in] | mtr | Mini-transaction context. |
Constructor.
[in] | frame | Page frame where the fragment node is located. |
[in] | ptr | Location of fragment node within page frame. |
[in] | len | Length of the fragment. |
[in] | mtr | Mini-transaction context. |
|
inline |
Get the offset of the current fragment within page.
|
inline |
|
inline |
Decrement the total length of this fragment by 2 bytes.
|
inline |
Gets the pointer just after the current fragment.
The pointer returned does not belong to this fragment. This is used to check adjacency.
|
inline |
|
inline |
Get the page frame.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the total length of this fragment, including its metadata.
|
inlinestatic |
Only the header size.
Don't include the page dir entry size here.
|
inline |
Increment the total length of this fragment by 2 bytes.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Merge the current fragment node with the given next fragment node.
This will succeed only if they are adjacent to each other. Detailed Note: There is a new page type FIL_PAGE_TYPE_ZLOB_FRAG_ENTRY
[in] | next | the next fragment. |
|
inlinestatic |
Amount of space that will be used up by meta data.
When a free space is taken from the fragment page to be used as a fragment node, header and footer will be the overhead. Footer is the page dir entry. The page dir entry may not be contiguous with the fragment.
|
inline |
Get the space available in this fragment for storing data.
|
inline |
|
inline |
Gets the pointer to the beginning of the current fragment.
Note that the beginning of the fragment contains meta data.
|
inline |
|
inline |
|
inline |
|
private |
The mini-transaction context.
It is only in-memory.
plist_node_t lob::frag_node_t::m_node |
The page list node.
|
static |
The offset where fragment data is stored.
|
static |
The offset where fragment id is stored.
|
static |
The offset where the length of fragment is stored.
The length includes both the payload and the meta data overhead.
|
static |
The size of a page directory entry in a fragment page in bytes.
This must be equal to z_frag_page_t::SIZE_OF_PAGE_DIR_ENTRY