MySQL 8.0.39
Source Code Documentation
lob::z_frag_entry_t Struct Reference

An entry representing one fragment page. More...

#include <lob0impl.h>

Public Member Functions

 z_frag_entry_t (flst_node_t *node, mtr_t *mtr)
 Constructor. More...
 
 z_frag_entry_t ()
 Constructor. More...
 
 z_frag_entry_t (mtr_t *mtr)
 Constructor. More...
 
void init ()
 Initialize the fragment entry contents. More...
 
void set_null ()
 Set the current fragment entry to null. More...
 
bool is_null () const
 Check if the current fragment entry is null. More...
 
fil_addr_t get_self_addr () const
 
void update (const z_frag_page_t &frag_page)
 Update the current fragment entry with information about the given fragment page. More...
 
void remove (flst_base_node_t *bnode)
 Remove this node from the given list. More...
 
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 first node in the given list. More...
 
void reset (flst_node_t *node)
 Point to another frag entry. More...
 
void set_prev_null ()
 Set the previous frag entry as null. More...
 
void set_prev (const fil_addr_t &addr)
 Set the previous frag entry as null. More...
 
fil_addr_t get_prev () const
 Get the location of previous frag entry. More...
 
void set_next_null ()
 Set the next frag entry as null. More...
 
void set_next (const fil_addr_t &addr)
 Set the next frag entry. More...
 
fil_addr_t get_next () const
 Get the location of next frag entry. More...
 
page_no_t get_page_no () const
 Get the frag page number. More...
 
void set_page_no (page_no_t page_no) const
 Set the frag page number. More...
 
void free_frag_page (mtr_t *mtr, dict_index_t *index)
 Free the fragment page pointed to by this entry. More...
 
ulint get_n_frags () const
 Get the frag page number. More...
 
void set_n_frags (ulint frags) const
 Set the frag page number. More...
 
ulint get_used_len () const
 Get the used bytes. More...
 
void set_used_len (ulint used) const
 Set the used bytes. More...
 
ulint get_total_free_len () const
 Get the total cumulative free bytes. More...
 
ulint get_big_free_len () const
 Get the biggest free frag bytes. More...
 
void set_total_free_len (ulint n)
 Set the total free bytes. More...
 
void set_big_free_len (ulint n)
 Set the big free frag bytes. More...
 
void purge (flst_base_node_t *used_lst, flst_base_node_t *free_lst)
 
std::ostream & print (std::ostream &out) const
 

Static Public Attributes

static const ulint OFFSET_PREV = 0
 Offset within frag entry pointing to prev frag entry. More...
 
static const ulint OFFSET_NEXT = OFFSET_PREV + FIL_ADDR_SIZE
 Offset within frag entry pointing to next frag entry. More...
 
static const ulint OFFSET_PAGE_NO = OFFSET_NEXT + FIL_ADDR_SIZE
 Offset within frag entry holding the page number of frag page. More...
 
static const ulint OFFSET_N_FRAGS = OFFSET_PAGE_NO + 4
 Number of used fragments. More...
 
static const ulint OFFSET_USED_LEN = OFFSET_N_FRAGS + 2
 Used space in bytes. More...
 
static const ulint OFFSET_TOTAL_FREE_LEN = OFFSET_USED_LEN + 2
 Total free space in bytes. More...
 
static const ulint OFFSET_BIG_FREE_LEN = OFFSET_TOTAL_FREE_LEN + 2
 The biggest free frag space in bytes. More...
 
static const ulint SIZE = OFFSET_BIG_FREE_LEN + 2
 Total size of one frag entry. More...
 

Private Attributes

flst_node_tm_node
 The location where the fragment entry node is located. More...
 
mtr_tm_mtr
 The mini-transaction context for operating on this fragment entry. More...
 

Detailed Description

An entry representing one fragment page.

Constructor & Destructor Documentation

◆ z_frag_entry_t() [1/3]

lob::z_frag_entry_t::z_frag_entry_t ( flst_node_t node,
mtr_t mtr 
)
inline

Constructor.

◆ z_frag_entry_t() [2/3]

lob::z_frag_entry_t::z_frag_entry_t ( )
inline

Constructor.

◆ z_frag_entry_t() [3/3]

lob::z_frag_entry_t::z_frag_entry_t ( mtr_t mtr)
inline

Constructor.

Member Function Documentation

◆ free_frag_page()

void lob::z_frag_entry_t::free_frag_page ( mtr_t mtr,
dict_index_t index 
)

Free the fragment page pointed to by this entry.

Parameters
[in]mtrMini-transaction to be used for this operation.
[in]indexThe index to which this LOB belongs.

◆ get_big_free_len()

ulint lob::z_frag_entry_t::get_big_free_len ( ) const
inline

Get the biggest free frag bytes.

◆ get_n_frags()

ulint lob::z_frag_entry_t::get_n_frags ( ) const
inline

Get the frag page number.

◆ get_next()

fil_addr_t lob::z_frag_entry_t::get_next ( ) const
inline

Get the location of next frag entry.

◆ get_page_no()

page_no_t lob::z_frag_entry_t::get_page_no ( ) const
inline

Get the frag page number.

◆ get_prev()

fil_addr_t lob::z_frag_entry_t::get_prev ( ) const
inline

Get the location of previous frag entry.

◆ get_self_addr()

fil_addr_t lob::z_frag_entry_t::get_self_addr ( ) const
inline

◆ get_total_free_len()

ulint lob::z_frag_entry_t::get_total_free_len ( ) const
inline

Get the total cumulative free bytes.

◆ get_used_len()

ulint lob::z_frag_entry_t::get_used_len ( ) const
inline

Get the used bytes.

◆ init()

void lob::z_frag_entry_t::init ( void  )
inline

Initialize the fragment entry contents.

For this to correctly work, the current object must be initialized with proper file list node and the mini-transaction context.

◆ is_null()

bool lob::z_frag_entry_t::is_null ( ) const
inline

Check if the current fragment entry is null.

Returns
true if the current fragment entry is null, false otherwise.

◆ print()

std::ostream & lob::z_frag_entry_t::print ( std::ostream &  out) const

◆ purge()

void lob::z_frag_entry_t::purge ( flst_base_node_t used_lst,
flst_base_node_t free_lst 
)

◆ push_back()

void lob::z_frag_entry_t::push_back ( flst_base_node_t bnode)
inline

Add this node as the last node in the given list.

Parameters
[in]bnodethe base node of the file list.

◆ push_front()

void lob::z_frag_entry_t::push_front ( flst_base_node_t bnode)
inline

Add this node as the first node in the given list.

Parameters
[in]bnodethe base node of the file list.

◆ remove()

void lob::z_frag_entry_t::remove ( flst_base_node_t bnode)
inline

Remove this node from the given list.

Parameters
[in]bnodethe base node of the list from which to remove current node.

◆ reset()

void lob::z_frag_entry_t::reset ( flst_node_t node)
inline

Point to another frag entry.

Parameters
[in]nodepoint to this file list node.

◆ set_big_free_len()

void lob::z_frag_entry_t::set_big_free_len ( ulint  n)
inline

Set the big free frag bytes.

◆ set_n_frags()

void lob::z_frag_entry_t::set_n_frags ( ulint  frags) const
inline

Set the frag page number.

◆ set_next()

void lob::z_frag_entry_t::set_next ( const fil_addr_t addr)
inline

Set the next frag entry.

◆ set_next_null()

void lob::z_frag_entry_t::set_next_null ( )
inline

Set the next frag entry as null.

◆ set_null()

void lob::z_frag_entry_t::set_null ( )
inline

Set the current fragment entry to null.

◆ set_page_no()

void lob::z_frag_entry_t::set_page_no ( page_no_t  page_no) const
inline

Set the frag page number.

◆ set_prev()

void lob::z_frag_entry_t::set_prev ( const fil_addr_t addr)
inline

Set the previous frag entry as null.

◆ set_prev_null()

void lob::z_frag_entry_t::set_prev_null ( )
inline

Set the previous frag entry as null.

◆ set_total_free_len()

void lob::z_frag_entry_t::set_total_free_len ( ulint  n)
inline

Set the total free bytes.

◆ set_used_len()

void lob::z_frag_entry_t::set_used_len ( ulint  used) const
inline

Set the used bytes.

◆ update()

void lob::z_frag_entry_t::update ( const z_frag_page_t frag_page)

Update the current fragment entry with information about the given fragment page.

Parameters
[in]frag_pagethe fragment page whose information will be stored in current fragment entry.

Member Data Documentation

◆ m_mtr

mtr_t* lob::z_frag_entry_t::m_mtr
private

The mini-transaction context for operating on this fragment entry.

◆ m_node

flst_node_t* lob::z_frag_entry_t::m_node
private

The location where the fragment entry node is located.

◆ OFFSET_BIG_FREE_LEN

const ulint lob::z_frag_entry_t::OFFSET_BIG_FREE_LEN = OFFSET_TOTAL_FREE_LEN + 2
static

The biggest free frag space in bytes.

◆ OFFSET_N_FRAGS

const ulint lob::z_frag_entry_t::OFFSET_N_FRAGS = OFFSET_PAGE_NO + 4
static

Number of used fragments.

◆ OFFSET_NEXT

const ulint lob::z_frag_entry_t::OFFSET_NEXT = OFFSET_PREV + FIL_ADDR_SIZE
static

Offset within frag entry pointing to next frag entry.

◆ OFFSET_PAGE_NO

const ulint lob::z_frag_entry_t::OFFSET_PAGE_NO = OFFSET_NEXT + FIL_ADDR_SIZE
static

Offset within frag entry holding the page number of frag page.

◆ OFFSET_PREV

const ulint lob::z_frag_entry_t::OFFSET_PREV = 0
static

Offset within frag entry pointing to prev frag entry.

◆ OFFSET_TOTAL_FREE_LEN

const ulint lob::z_frag_entry_t::OFFSET_TOTAL_FREE_LEN = OFFSET_USED_LEN + 2
static

Total free space in bytes.

◆ OFFSET_USED_LEN

const ulint lob::z_frag_entry_t::OFFSET_USED_LEN = OFFSET_N_FRAGS + 2
static

Used space in bytes.

◆ SIZE

const ulint lob::z_frag_entry_t::SIZE = OFFSET_BIG_FREE_LEN + 2
static

Total size of one frag entry.


The documentation for this struct was generated from the following files: