MySQL 8.4.2
Source Code Documentation
PageCallback Struct Referenceabstract

Callback functor. More...

#include <fil0fil.h>

Inheritance diagram for PageCallback:
[legend]

Public Member Functions

 PageCallback ()
 Default constructor. More...
 
virtual ~PageCallback () 1=default
 
virtual dberr_t init (os_offset_t file_size, const buf_block_t *block) 1=0
 Called for page 0 in the tablespace file at the start. More...
 
virtual dberr_t operator() (os_offset_t offset, buf_block_t *block) 1=0
 Called for every page in the tablespace. More...
 
void set_file (const char *filename, pfs_os_file_t file) 1
 Set the name of the physical file and the file handle that is used to open it for the file that is being iterated over. More...
 
virtual space_id_t get_space_id () const 1=0
 
virtual ulint get_space_flags () const 1=0
 
void set_page_size (const buf_frame_t *page) 1
 Set the tablespace table size. More...
 
const page_size_tget_page_size () const
 The compressed page size. More...
 
 PageCallback (PageCallback &&)=delete
 
 PageCallback (const PageCallback &)=delete
 
PageCallbackoperator= (const PageCallback &)=delete
 

Public Attributes

page_size_t m_page_size
 The tablespace page size. More...
 
pfs_os_file_t m_file
 File handle to the tablespace. More...
 
const char * m_filepath
 Physical file path. More...
 

Detailed Description

Callback functor.

Constructor & Destructor Documentation

◆ PageCallback() [1/3]

PageCallback::PageCallback ( )
inline

Default constructor.

◆ ~PageCallback()

virtual PageCallback::~PageCallback ( )
virtualdefault

◆ PageCallback() [2/3]

PageCallback::PageCallback ( PageCallback &&  )
delete

◆ PageCallback() [3/3]

PageCallback::PageCallback ( const PageCallback )
delete

Member Function Documentation

◆ get_page_size()

const page_size_t & PageCallback::get_page_size ( ) const
inline

The compressed page size.

Returns
the compressed page size

◆ get_space_flags()

virtual ulint PageCallback::get_space_flags ( ) const
pure virtual
Return values
thespace flags of the tablespace being iterated over

Implemented in FetchIndexRootPages, and PageConverter.

◆ get_space_id()

virtual space_id_t PageCallback::get_space_id ( ) const
pure virtual
Returns
the space id of the tablespace

Implemented in FetchIndexRootPages, and PageConverter.

◆ init()

virtual dberr_t PageCallback::init ( os_offset_t  file_size,
const buf_block_t block 
)
pure virtual

Called for page 0 in the tablespace file at the start.

Parameters
file_sizesize of the file in bytes
blockcontents of the first page in the tablespace file
Return values
DB_SUCCESSor error code.

Implemented in AbstractCallback.

◆ operator()()

virtual dberr_t PageCallback::operator() ( os_offset_t  offset,
buf_block_t block 
)
pure virtual

Called for every page in the tablespace.

If the page was not updated then its state must be set to BUF_PAGE_NOT_USED. For compressed tables the page descriptor memory will be at offset: block->frame + UNIV_PAGE_SIZE;

Parameters
offsetphysical offset within the file
blockblock read from file, note it is not from the buffer pool
Return values
DB_SUCCESSor error code.

Implemented in FetchIndexRootPages, and PageConverter.

◆ operator=()

PageCallback & PageCallback::operator= ( const PageCallback )
delete

◆ set_file()

void PageCallback::set_file ( const char *  filename,
pfs_os_file_t  file 
)
inline

Set the name of the physical file and the file handle that is used to open it for the file that is being iterated over.

Parameters
filenamethen physical name of the tablespace file.
fileOS file handle

◆ set_page_size()

void PageCallback::set_page_size ( const buf_frame_t page)

Set the tablespace table size.

Parameters
[in]pagea page belonging to the tablespace

Member Data Documentation

◆ m_file

pfs_os_file_t PageCallback::m_file

File handle to the tablespace.

◆ m_filepath

const char* PageCallback::m_filepath

Physical file path.

◆ m_page_size

page_size_t PageCallback::m_page_size

The tablespace page size.


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