MySQL 9.1.0
Source Code Documentation
lob::z_first_page_t Struct Reference

The first page of an zlob. More...

#include <zlob0first.h>

Public Member Functions

ulint get_n_index_entries () const
 Given the page size, what is the number of index entries the first page can contain. More...
 
ulint get_n_frag_entries () const
 Given the page size, what is the number of frag entries the first page can contain. More...
 
ulint size_of_index_entries () const
 
ulint size_of_frag_entries () const
 
ulint begin_frag_entries () const
 
ulint begin_data () const
 
bool is_empty () const
 
ulint get_index_list_length () const
 Get the length of the index list. More...
 
void set_version_0 ()
 
bytebegin_data_ptr () const
 
ulint payload ()
 Amount of zlob data that can be stored in first page (in bytes). More...
 
 z_first_page_t ()
 
 z_first_page_t (mtr_t *mtr, dict_index_t *index)
 
 z_first_page_t (buf_block_t *block)
 
 z_first_page_t (buf_block_t *block, mtr_t *mtr, dict_index_t *index)
 
buf_block_talloc (bool bulk)
 
void import (trx_id_t trx_id)
 
page_type_t get_page_type () const
 
buf_block_tload_x (page_no_t page_no)
 Load the given page number as the first page in x-latch mode. More...
 
buf_block_tload_x (mtr_t *mtr) const
 Load the first page using given mini-transaction. More...
 
buf_block_tload_x (const page_id_t &page_id, const page_size_t &page_size)
 Load the first page of the compressed LOB with x-latch. More...
 
buf_block_tload_s (page_no_t page_no)
 Load the given page number as the first page in s-latch mode. More...
 
void dealloc ()
 Deallocate the first page of a compressed LOB. More...
 
void set_next_page_null ()
 Set the FIL_PAGE_NEXT to FIL_NULL. More...
 
void set_prev_page_null ()
 Set the FIL_PAGE_PREV to FIL_NULL. More...
 
void set_next_page_no (page_no_t page_no, mtr_t *mtr)
 Set the FIL_PAGE_NEXT to the given value. More...
 
void set_prev_page_no (page_no_t page_no, mtr_t *mtr)
 Set the FIL_PAGE_PREV to the given value. More...
 
void set_space_id_no_redo (space_id_t space_id)
 Write the space identifier to the page header, without generating redo log records. More...
 
void init ()
 
ulint get_data_len () const
 Get the amount of zlob data stored in this page. More...
 
page_no_t get_page_no () const
 Get the page number. More...
 
page_id_t get_page_id () const
 Get the page id of the first page of compressed LOB. More...
 
fil_addr_t get_self_addr () const
 
void set_index_page_no (page_no_t page_no)
 All the index pages are singly linked with each other, and the first page contains the link to one index page. More...
 
void set_index_page_no (page_no_t page_no, mtr_t *mtr)
 All the index pages are singly linked with each other, and the first page contains the link to one index page. More...
 
page_no_t get_index_page_no () const
 All the index pages are singly linked with each other, and the first page contains the link to one index page. More...
 
page_no_t get_frag_page_no () const
 All the fragment pages are doubly linked with each other, and the first page contains the link to one fragment page in FIL_PAGE_PREV. More...
 
page_no_t get_frag_page_no (mtr_t *mtr) const
 All the fragment pages are doubly linked with each other, and the first page contains the link to one fragment page in FIL_PAGE_PREV. More...
 
bool verify_frag_page_no ()
 Verify that the page number pointed to by FIL_PAGE_PREV of the first page of LOB is indeed a fragment page. More...
 
void set_frag_page_no (mtr_t *mtr, page_no_t page_no)
 All the fragment pages (. More...
 
void set_frag_page_no (page_no_t page_no)
 All the fragment pages (. More...
 
void set_frag_node_page_no (page_no_t page_no)
 All the frag node pages (. More...
 
void set_frag_node_page_no (page_no_t page_no, mtr_t *mtr)
 All the frag node pages (. More...
 
size_t free_all_frag_node_pages ()
 Free all the z_frag_page_t pages. More...
 
size_t free_all_index_pages ()
 Free all the index pages. More...
 
size_t free_all_frag_pages ()
 Free all the fragment pages. More...
 
size_t free_all_data_pages ()
 Free all the data pages. More...
 
page_no_t get_frag_node_page_no ()
 All the frag node pages are singly linked with each other, and the first page contains the link to one frag node page. More...
 
void set_page_type_unknown ()
 Set the page type to FIL_PAGE_TYPE_UNKNOWN. More...
 
void set_page_type ()
 
void set_data_len (ulint len)
 
void set_trx_id (trx_id_t tid)
 Update the trx id in the header. More...
 
void set_trx_id_no_redo (trx_id_t tid)
 Update the trx id in the header, without generating redo log records. More...
 
void init_lob_version ()
 Initialize the LOB version to 1. More...
 
uint32_t get_lob_version ()
 Get the LOB version. More...
 
uint32_t incr_lob_version ()
 Increment LOB version by 1. More...
 
uint8_t get_flags ()
 Get one byte of flags. More...
 
bool can_be_partially_updated ()
 When the bit is set, the LOB is not partially updatable anymore. More...
 
void mark_cannot_be_partially_updated (trx_t *trx)
 When the bit is set, the LOB is not partially updatable anymore. More...
 
void set_last_trx_id (trx_id_t tid)
 
void set_last_trx_id_no_redo (trx_id_t tid)
 Update the last transaction identifier in the header, without generating redo logs. More...
 
void set_last_trx_undo_no (undo_no_t undo_no)
 
trx_id_t get_last_trx_id () const
 
undo_no_t get_last_trx_undo_no () const
 
flst_base_node_tfree_list () const
 
flst_base_node_tindex_list () const
 
flst_base_node_tfree_frag_list () const
 
flst_base_node_tfrag_list () const
 
void init_frag_entries ()
 
void init_index_entries ()
 
frag_id_t alloc_fragment (bool bulk, ulint len, z_frag_page_t &frag_page, z_frag_entry_t &entry)
 Allocate a fragment of the given size. More...
 
z_index_entry_t alloc_index_entry (bool bulk)
 Allocate one index entry. More...
 
z_frag_entry_t alloc_frag_entry (bool bulk)
 Allocate one frag page entry. More...
 
std::ostream & print_index_entries (std::ostream &out) const
 Print the index entries. More...
 
std::ostream & print_frag_entries (std::ostream &out) const
 Print the index entries. More...
 
std::ostream & print (std::ostream &out) const
 Print the page. More...
 
byteframe () const
 
flst_node_taddr2ptr_x (fil_addr_t &addr) const
 Load the page, in x-latch mode, containing the given file address. More...
 
flst_node_taddr2ptr_x (fil_addr_t &addr, mtr_t *mtr) const
 Load the page, in x-latch mode, containing the given file address. More...
 
flst_node_taddr2ptr_s (fil_addr_t &addr)
 Load the page, in s-latch mode, containing the given file address. More...
 
void load_entry_s (fil_addr_t &addr, z_index_entry_t &entry)
 Load the entry available in the given file address. More...
 
void load_entry_x (fil_addr_t &addr, z_index_entry_t &entry)
 Load the entry available in the given file address. More...
 
size_t destroy ()
 Free all the pages of the zlob. More...
 
size_t make_empty ()
 Free all the pages of the zlob except the first page. More...
 
bool validate ()
 Validate the LOB. More...
 
buf_block_tget_block () const
 Get the buffer block of the first page of LOB. More...
 
void set_mtr (mtr_t *mtr)
 
void restart_mtr (mtr_t *mtr)
 Restart the given mtr. More...
 

Static Public Attributes

static const ulint OFFSET_VERSION = FIL_PAGE_DATA
 Version information. More...
 
static const ulint OFFSET_FLAGS = FIL_PAGE_DATA + 1
 One byte of flag bits. More...
 
static const uint32_t OFFSET_LOB_VERSION = OFFSET_FLAGS + 1
 LOB version. More...
 
static const ulint OFFSET_LAST_TRX_ID = OFFSET_LOB_VERSION + 4
 The last transaction that modified this LOB. More...
 
static const ulint OFFSET_LAST_UNDO_NO = OFFSET_LAST_TRX_ID + 6
 The last transaction that modified this LOB. More...
 
static const ulint OFFSET_DATA_LEN = OFFSET_LAST_UNDO_NO + 4
 The length of compressed data stored in this page. More...
 
static const ulint OFFSET_TRX_ID = OFFSET_DATA_LEN + 4
 The transaction that created data in the data portion. More...
 
static const ulint OFFSET_INDEX_PAGE_NO = OFFSET_TRX_ID + 6
 The next index page. More...
 
static const ulint OFFSET_FRAG_NODES_PAGE_NO = OFFSET_INDEX_PAGE_NO + 4
 The next frag nodes page. More...
 
static const ulint OFFSET_FREE_LIST = OFFSET_FRAG_NODES_PAGE_NO + 4
 List of free index entries. More...
 
static const ulint OFFSET_INDEX_LIST = OFFSET_FREE_LIST + FLST_BASE_NODE_SIZE
 List of index entries. More...
 
static const ulint OFFSET_FREE_FRAG_LIST
 List of free frag entries. More...
 
static const ulint OFFSET_FRAG_LIST
 List of frag entries. More...
 
static const ulint OFFSET_INDEX_BEGIN
 Begin of index entries. More...
 

Private Member Functions

size_t free_all_frag_pages_old ()
 Free all the fragment pages when the next page of the first LOB page IS NOT USED to link the fragment pages. More...
 
size_t free_all_frag_pages_new ()
 Free all the fragment pages when the next page of the first LOB page IS USED to link the fragment pages. More...
 
bool validate_low ()
 Validate the LOB. More...
 

Private Attributes

buf_block_tm_block
 The buffer block of the first page. More...
 
mtr_tm_mtr
 The mini-transaction context. More...
 
dict_index_tm_index
 The index dictionary object. More...
 

Detailed Description

The first page of an zlob.

Constructor & Destructor Documentation

◆ z_first_page_t() [1/4]

lob::z_first_page_t::z_first_page_t ( )
inline

◆ z_first_page_t() [2/4]

lob::z_first_page_t::z_first_page_t ( mtr_t mtr,
dict_index_t index 
)
inline

◆ z_first_page_t() [3/4]

lob::z_first_page_t::z_first_page_t ( buf_block_t block)
inline

◆ z_first_page_t() [4/4]

lob::z_first_page_t::z_first_page_t ( buf_block_t block,
mtr_t mtr,
dict_index_t index 
)
inline

Member Function Documentation

◆ addr2ptr_s()

flst_node_t * lob::z_first_page_t::addr2ptr_s ( fil_addr_t addr)
inline

Load the page, in s-latch mode, containing the given file address.

Parameters
[in]addrgiven file address
Returns
the file list node pointer.

◆ addr2ptr_x() [1/2]

flst_node_t * lob::z_first_page_t::addr2ptr_x ( fil_addr_t addr) const
inline

Load the page, in x-latch mode, containing the given file address.

Parameters
[in]addrgiven file address
Returns
the file list node pointer.

◆ addr2ptr_x() [2/2]

flst_node_t * lob::z_first_page_t::addr2ptr_x ( fil_addr_t addr,
mtr_t mtr 
) const
inline

Load the page, in x-latch mode, containing the given file address.

Parameters
[in]addrgiven file address
[in]mtrthe mini-transaction context to be used.
Returns
the file list node pointer.

◆ alloc()

buf_block_t * lob::z_first_page_t::alloc ( bool  bulk)

◆ alloc_frag_entry()

z_frag_entry_t lob::z_first_page_t::alloc_frag_entry ( bool  bulk)

Allocate one frag page entry.

If there is no free frag entry, allocate an frag node page (a page full of z_frag_entry_t objects) and service the request.

Returns
the allocated frag entry.

◆ alloc_fragment()

frag_id_t lob::z_first_page_t::alloc_fragment ( bool  bulk,
ulint  len,
z_frag_page_t frag_page,
z_frag_entry_t entry 
)

Allocate a fragment of the given size.

This involves finding a fragment page, that has space to store len bytes of data. If necessary, allocate a new fragment page.

Parameters
[in]bulktrue if it is bulk operation (OPCODE_INSERT_BULK), false otherwise.
[in]lenlength of data to be stored in fragment page.
[out]frag_pagethe fragment page with the needed free space.
[out]entryfragment page entry representing frag_page.
Returns
fragment identifier within the fragment page.
FRAG_ID_NULL if fragment could not be allocated.

◆ alloc_index_entry()

z_index_entry_t lob::z_first_page_t::alloc_index_entry ( bool  bulk)

Allocate one index entry.

If there is no free index entry, allocate an index page (a page full of z_index_entry_t objects) and service the request.

Returns
the allocated index entry.

◆ begin_data()

ulint lob::z_first_page_t::begin_data ( ) const
inline

◆ begin_data_ptr()

byte * lob::z_first_page_t::begin_data_ptr ( ) const
inline

◆ begin_frag_entries()

ulint lob::z_first_page_t::begin_frag_entries ( ) const
inline

◆ can_be_partially_updated()

bool lob::z_first_page_t::can_be_partially_updated ( )
inline

When the bit is set, the LOB is not partially updatable anymore.

Returns
true, if partially updatable.
false, if partially NOT updatable.

◆ dealloc()

void lob::z_first_page_t::dealloc ( )

Deallocate the first page of a compressed LOB.

◆ destroy()

size_t lob::z_first_page_t::destroy ( )

Free all the pages of the zlob.

Returns
the total number of pages freed.

◆ frag_list()

flst_base_node_t * lob::z_first_page_t::frag_list ( ) const
inline

◆ frame()

byte * lob::z_first_page_t::frame ( ) const
inline

◆ free_all_data_pages()

size_t lob::z_first_page_t::free_all_data_pages ( )

Free all the data pages.

Returns
the number of pages freed.

◆ free_all_frag_node_pages()

size_t lob::z_first_page_t::free_all_frag_node_pages ( )

Free all the z_frag_page_t pages.

All the z_frag_page_t pages are singly linked to each other. The head of the list is maintained in the first page.

Returns
the number of pages freed.

All the z_frag_page_t pages are singly linked to each other. The head of the list is maintained in the first page.

◆ free_all_frag_pages()

size_t lob::z_first_page_t::free_all_frag_pages ( )

Free all the fragment pages.

Returns
the number of pages freed.

◆ free_all_frag_pages_new()

size_t lob::z_first_page_t::free_all_frag_pages_new ( )
private

Free all the fragment pages when the next page of the first LOB page IS USED to link the fragment pages.

Returns
the number of pages freed.

◆ free_all_frag_pages_old()

size_t lob::z_first_page_t::free_all_frag_pages_old ( )
private

Free all the fragment pages when the next page of the first LOB page IS NOT USED to link the fragment pages.

Returns
the number of pages freed.

◆ free_all_index_pages()

size_t lob::z_first_page_t::free_all_index_pages ( )

Free all the index pages.

Returns
the number of pages freed.

◆ free_frag_list()

flst_base_node_t * lob::z_first_page_t::free_frag_list ( ) const
inline

◆ free_list()

flst_base_node_t * lob::z_first_page_t::free_list ( ) const
inline

◆ get_block()

buf_block_t * lob::z_first_page_t::get_block ( ) const
inline

Get the buffer block of the first page of LOB.

Returns
the buffer block of the first page of LOB.

◆ get_data_len()

ulint lob::z_first_page_t::get_data_len ( ) const
inline

Get the amount of zlob data stored in this page.

◆ get_flags()

uint8_t lob::z_first_page_t::get_flags ( )
inline

Get one byte of flags.

Returns
one byte of flags.

◆ get_frag_node_page_no()

page_no_t lob::z_first_page_t::get_frag_node_page_no ( )
inline

All the frag node pages are singly linked with each other, and the first page contains the link to one frag node page.

Get that frag node page number.

Returns
the index page number.

◆ get_frag_page_no() [1/2]

page_no_t lob::z_first_page_t::get_frag_page_no ( ) const
inline

All the fragment pages are doubly linked with each other, and the first page contains the link to one fragment page in FIL_PAGE_PREV.

Get that frag page number.

Returns
the frag page number.

◆ get_frag_page_no() [2/2]

page_no_t lob::z_first_page_t::get_frag_page_no ( mtr_t mtr) const
inline

All the fragment pages are doubly linked with each other, and the first page contains the link to one fragment page in FIL_PAGE_PREV.

Get that frag page number.

Parameters
[in]mtrMini-transaction to use for this read operation.
Returns
the frag page number.

◆ get_index_list_length()

ulint lob::z_first_page_t::get_index_list_length ( ) const
inline

Get the length of the index list.

Returns
length of the index list.

◆ get_index_page_no()

page_no_t lob::z_first_page_t::get_index_page_no ( ) const
inline

All the index pages are singly linked with each other, and the first page contains the link to one index page.

Get that index page number.

Returns
the index page number.

◆ get_last_trx_id()

trx_id_t lob::z_first_page_t::get_last_trx_id ( ) const
inline

◆ get_last_trx_undo_no()

undo_no_t lob::z_first_page_t::get_last_trx_undo_no ( ) const
inline

◆ get_lob_version()

uint32_t lob::z_first_page_t::get_lob_version ( )
inline

Get the LOB version.

Returns
the LOB version.

◆ get_n_frag_entries()

ulint lob::z_first_page_t::get_n_frag_entries ( ) const

Given the page size, what is the number of frag entries the first page can contain.

◆ get_n_index_entries()

ulint lob::z_first_page_t::get_n_index_entries ( ) const

Given the page size, what is the number of index entries the first page can contain.

◆ get_page_id()

page_id_t lob::z_first_page_t::get_page_id ( ) const
inline

Get the page id of the first page of compressed LOB.

Returns
page id of the first page of compressed LOB.

◆ get_page_no()

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

Get the page number.

◆ get_page_type()

page_type_t lob::z_first_page_t::get_page_type ( ) const
inline

◆ get_self_addr()

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

◆ import()

void lob::z_first_page_t::import ( trx_id_t  trx_id)

◆ incr_lob_version()

uint32_t lob::z_first_page_t::incr_lob_version ( )

Increment LOB version by 1.

Increment the LOB version by 1.

◆ index_list()

flst_base_node_t * lob::z_first_page_t::index_list ( ) const
inline

◆ init()

void lob::z_first_page_t::init ( void  )
inline

◆ init_frag_entries()

void lob::z_first_page_t::init_frag_entries ( )
inline

◆ init_index_entries()

void lob::z_first_page_t::init_index_entries ( )

◆ init_lob_version()

void lob::z_first_page_t::init_lob_version ( )
inline

Initialize the LOB version to 1.

◆ is_empty()

bool lob::z_first_page_t::is_empty ( void  ) const
inline

◆ load_entry_s()

void lob::z_first_page_t::load_entry_s ( fil_addr_t addr,
z_index_entry_t entry 
)

Load the entry available in the given file address.

Parameters
[in]addrfile address
[out]entrythe entry to be loaded.

◆ load_entry_x()

void lob::z_first_page_t::load_entry_x ( fil_addr_t addr,
z_index_entry_t entry 
)

Load the entry available in the given file address.

Parameters
[in]addrfile address
[out]entrythe entry to be loaded.

◆ load_s()

buf_block_t * lob::z_first_page_t::load_s ( page_no_t  page_no)
inline

Load the given page number as the first page in s-latch mode.

Parameters
[in]page_nothe first page number.
Returns
the buffer block of the given page number.

◆ load_x() [1/3]

buf_block_t * lob::z_first_page_t::load_x ( const page_id_t page_id,
const page_size_t page_size 
)

Load the first page of the compressed LOB with x-latch.

Parameters
[in]page_idthe page identifier of first page
[in]page_sizethe page size information of table.
Returns
buffer block of the first page.

◆ load_x() [2/3]

buf_block_t * lob::z_first_page_t::load_x ( mtr_t mtr) const
inline

Load the first page using given mini-transaction.

The first page must already be x-latched by the m_mtr.

Parameters
[in]mtrthe mini-transaction in which first page is to be loaded.
Returns
the buffer block of first page.

◆ load_x() [3/3]

buf_block_t * lob::z_first_page_t::load_x ( page_no_t  page_no)
inline

Load the given page number as the first page in x-latch mode.

Parameters
[in]page_nothe first page number.
Returns
the buffer block of the given page number.

◆ make_empty()

size_t lob::z_first_page_t::make_empty ( )

Free all the pages of the zlob except the first page.

Returns
the total number of pages freed.

◆ mark_cannot_be_partially_updated()

void lob::z_first_page_t::mark_cannot_be_partially_updated ( trx_t trx)

When the bit is set, the LOB is not partially updatable anymore.

Enable the bit.

Parameters
[in]trxthe current transaction.

◆ payload()

ulint lob::z_first_page_t::payload ( )
inline

Amount of zlob data that can be stored in first page (in bytes).

◆ print()

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

Print the page.

◆ print_frag_entries()

std::ostream & lob::z_first_page_t::print_frag_entries ( std::ostream &  out) const

Print the index entries.

Print the frag entries.

◆ print_index_entries()

std::ostream & lob::z_first_page_t::print_index_entries ( std::ostream &  out) const

Print the index entries.

◆ restart_mtr()

void lob::z_first_page_t::restart_mtr ( mtr_t mtr)
inline

Restart the given mtr.

The first page must already be x-latched by the m_mtr.

Parameters
[in]mtrthe mini-transaction context which is to be restarted.

◆ set_data_len()

void lob::z_first_page_t::set_data_len ( ulint  len)
inline

◆ set_frag_node_page_no() [1/2]

void lob::z_first_page_t::set_frag_node_page_no ( page_no_t  page_no)
inline

All the frag node pages (.

See also
z_frag_node_page_t) are singly linked with each other, and the first page contains the link to the last allocated frag node page. The last allocated FIL_PAGE_TYPE_ZLOB_FRAG_ENTRY page will be the first in this list. This list is used to free these pages.
Parameters
[in]page_nothe page number of an frag node page.

◆ set_frag_node_page_no() [2/2]

void lob::z_first_page_t::set_frag_node_page_no ( page_no_t  page_no,
mtr_t mtr 
)
inline

All the frag node pages (.

See also
z_frag_node_page_t) are singly linked with each other, and the first page contains the link to the last allocated frag node page. The last allocated FIL_PAGE_TYPE_ZLOB_FRAG_ENTRY page will be the first in this list. This list is used to free these pages.
Parameters
[in]page_nothe page number of an frag node page.
[in]mtrmini trx context to generate redo logs.

◆ set_frag_page_no() [1/2]

void lob::z_first_page_t::set_frag_page_no ( mtr_t mtr,
page_no_t  page_no 
)
inline

All the fragment pages (.

See also
z_frag_page_t) are doubly linked with each other, and the first page contains the link to one fragment page in FIL_PAGE_PREV.
Parameters
[in]mtrMini-transaction for this modification.
[in]page_noThe page number of a fragment page.

◆ set_frag_page_no() [2/2]

void lob::z_first_page_t::set_frag_page_no ( page_no_t  page_no)
inline

All the fragment pages (.

See also
z_frag_page_t) are doubly linked with each other, and the first page contains the link to one fragment page in FIL_PAGE_PREV.
Parameters
[in]page_nothe page number of a fragment page.

◆ set_index_page_no() [1/2]

void lob::z_first_page_t::set_index_page_no ( page_no_t  page_no)
inline

All the index pages are singly linked with each other, and the first page contains the link to one index page.

Parameters
[in]page_nothe page number of an index page.

◆ set_index_page_no() [2/2]

void lob::z_first_page_t::set_index_page_no ( page_no_t  page_no,
mtr_t mtr 
)
inline

All the index pages are singly linked with each other, and the first page contains the link to one index page.

Parameters
[in]page_nothe page number of an index page.
[in]mtruse this mini transaction context for redo logs.

◆ set_last_trx_id()

void lob::z_first_page_t::set_last_trx_id ( trx_id_t  tid)
inline

◆ set_last_trx_id_no_redo()

void lob::z_first_page_t::set_last_trx_id_no_redo ( trx_id_t  tid)
inline

Update the last transaction identifier in the header, without generating redo logs.

Parameters
[in]tidgiven transaction identifier.

◆ set_last_trx_undo_no()

void lob::z_first_page_t::set_last_trx_undo_no ( undo_no_t  undo_no)
inline

◆ set_mtr()

void lob::z_first_page_t::set_mtr ( mtr_t mtr)
inline

◆ set_next_page_no()

void lob::z_first_page_t::set_next_page_no ( page_no_t  page_no,
mtr_t mtr 
)
inline

Set the FIL_PAGE_NEXT to the given value.

Parameters
[in]page_nothe page number to set in FIL_PAGE_NEXT.
[in]mtrmini trx to be used for this modification.

◆ set_next_page_null()

void lob::z_first_page_t::set_next_page_null ( )
inline

Set the FIL_PAGE_NEXT to FIL_NULL.

◆ set_page_type()

void lob::z_first_page_t::set_page_type ( )
inline

◆ set_page_type_unknown()

void lob::z_first_page_t::set_page_type_unknown ( )
inline

Set the page type to FIL_PAGE_TYPE_UNKNOWN.

This is done while deallocating this page.

◆ set_prev_page_no()

void lob::z_first_page_t::set_prev_page_no ( page_no_t  page_no,
mtr_t mtr 
)
inline

Set the FIL_PAGE_PREV to the given value.

Parameters
[in]page_nothe page number to set in FIL_PAGE_PREV.
[in]mtrmini trx to be used for this modification.

◆ set_prev_page_null()

void lob::z_first_page_t::set_prev_page_null ( )
inline

Set the FIL_PAGE_PREV to FIL_NULL.

◆ set_space_id_no_redo()

void lob::z_first_page_t::set_space_id_no_redo ( space_id_t  space_id)
inline

Write the space identifier to the page header, without generating redo log records.

Parameters
[in]space_idthe space identifier.

◆ set_trx_id()

void lob::z_first_page_t::set_trx_id ( trx_id_t  tid)
inline

Update the trx id in the header.

Parameters
[in]tidthe given transaction identifier.

◆ set_trx_id_no_redo()

void lob::z_first_page_t::set_trx_id_no_redo ( trx_id_t  tid)
inline

Update the trx id in the header, without generating redo log records.

Parameters
[in]tidthe given transaction identifier.

◆ set_version_0()

void lob::z_first_page_t::set_version_0 ( )
inline

◆ size_of_frag_entries()

ulint lob::z_first_page_t::size_of_frag_entries ( ) const
inline

◆ size_of_index_entries()

ulint lob::z_first_page_t::size_of_index_entries ( ) const

◆ validate()

bool lob::z_first_page_t::validate ( )
inline

Validate the LOB.

Returns
true if valid, false otherwise.

◆ validate_low()

bool lob::z_first_page_t::validate_low ( )
private

Validate the LOB.

This is a costly function. We need to avoid using this directly, instead call z_first_page_t::validate().

Returns
true if valid, false otherwise.

◆ verify_frag_page_no()

bool lob::z_first_page_t::verify_frag_page_no ( )

Verify that the page number pointed to by FIL_PAGE_PREV of the first page of LOB is indeed a fragment page.

It uses its own mtr internally.

Returns
true if it is a fragment page, false otherwise.

Member Data Documentation

◆ m_block

buf_block_t* lob::z_first_page_t::m_block
private

The buffer block of the first page.

◆ m_index

dict_index_t* lob::z_first_page_t::m_index
private

The index dictionary object.

◆ m_mtr

mtr_t* lob::z_first_page_t::m_mtr
private

The mini-transaction context.

◆ OFFSET_DATA_LEN

const ulint lob::z_first_page_t::OFFSET_DATA_LEN = OFFSET_LAST_UNDO_NO + 4
static

The length of compressed data stored in this page.

◆ OFFSET_FLAGS

const ulint lob::z_first_page_t::OFFSET_FLAGS = FIL_PAGE_DATA + 1
static

One byte of flag bits.

Currently only one bit (the least significant bit) is used, other 7 bits are available for future use.

◆ OFFSET_FRAG_LIST

const ulint lob::z_first_page_t::OFFSET_FRAG_LIST
static
Initial value:
=
constexpr ulint FLST_BASE_NODE_SIZE
Definition: fut0lst.h:50
static const ulint OFFSET_FREE_FRAG_LIST
List of free frag entries.
Definition: zlob0first.h:74

List of frag entries.

◆ OFFSET_FRAG_NODES_PAGE_NO

const ulint lob::z_first_page_t::OFFSET_FRAG_NODES_PAGE_NO = OFFSET_INDEX_PAGE_NO + 4
static

The next frag nodes page.

◆ OFFSET_FREE_FRAG_LIST

const ulint lob::z_first_page_t::OFFSET_FREE_FRAG_LIST
static
Initial value:
=
static const ulint OFFSET_INDEX_LIST
List of index entries.
Definition: zlob0first.h:71

List of free frag entries.

◆ OFFSET_FREE_LIST

const ulint lob::z_first_page_t::OFFSET_FREE_LIST = OFFSET_FRAG_NODES_PAGE_NO + 4
static

List of free index entries.

◆ OFFSET_INDEX_BEGIN

const ulint lob::z_first_page_t::OFFSET_INDEX_BEGIN
static
Initial value:
=
static const ulint OFFSET_FRAG_LIST
List of frag entries.
Definition: zlob0first.h:78

Begin of index entries.

◆ OFFSET_INDEX_LIST

const ulint lob::z_first_page_t::OFFSET_INDEX_LIST = OFFSET_FREE_LIST + FLST_BASE_NODE_SIZE
static

List of index entries.

◆ OFFSET_INDEX_PAGE_NO

const ulint lob::z_first_page_t::OFFSET_INDEX_PAGE_NO = OFFSET_TRX_ID + 6
static

The next index page.

◆ OFFSET_LAST_TRX_ID

const ulint lob::z_first_page_t::OFFSET_LAST_TRX_ID = OFFSET_LOB_VERSION + 4
static

The last transaction that modified this LOB.

◆ OFFSET_LAST_UNDO_NO

const ulint lob::z_first_page_t::OFFSET_LAST_UNDO_NO = OFFSET_LAST_TRX_ID + 6
static

The last transaction that modified this LOB.

◆ OFFSET_LOB_VERSION

const uint32_t lob::z_first_page_t::OFFSET_LOB_VERSION = OFFSET_FLAGS + 1
static

LOB version.

4 bytes.

◆ OFFSET_TRX_ID

const ulint lob::z_first_page_t::OFFSET_TRX_ID = OFFSET_DATA_LEN + 4
static

The transaction that created data in the data portion.

◆ OFFSET_VERSION

const ulint lob::z_first_page_t::OFFSET_VERSION = FIL_PAGE_DATA
static

Version information.

One byte.


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