InnoDB Plugin  1.0
Public Member Functions | Data Fields | Protected Member Functions
PageCallback Struct Reference

#include <fil0fil.h>

Public Member Functions

 PageCallback ()
virtual dberr_t init (os_offset_t file_size, const buf_block_t *block) UNIV_NOTHROW=0
virtual dberr_t operator() (os_offset_t offset, buf_block_t *block) UNIV_NOTHROW=0
void set_file (const char *filename, os_file_t file) UNIV_NOTHROW
virtual ulint get_space_id () const UNIV_NOTHROW=0
ulint get_zip_size () const
dberr_t set_zip_size (const buf_frame_t *page) UNIV_NOTHROW
ulint get_page_size () const

Data Fields

ulint m_zip_size
ulint m_page_size
os_file_t m_file
const char * m_filepath

Protected Member Functions

 PageCallback (const PageCallback &)
PageCallbackoperator= (const PageCallback &)

Detailed Description

Callback functor.

Constructor & Destructor Documentation

PageCallback::PageCallback ( )
inline

Default constructor

Member Function Documentation

ulint PageCallback::get_page_size ( ) const
inline
The compressed page size
Returns
the compressed page size
virtual ulint PageCallback::get_space_id ( ) const
pure virtual
Returns
the space id of the tablespace
ulint PageCallback::get_zip_size ( ) const
inline
The compressed page size
Returns
the compressed page size
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_size- size of the file in bytes
block- contents of the first page in the tablespace file
Return values
DB_SUCCESSor error code.
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
offset- physical offset within the file
block- block read from file, note it is not from the buffer pool
Return values
DB_SUCCESSor error code.
void PageCallback::set_file ( const char *  filename,
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
filename- then physical name of the tablespace file.
file- OS file handle
dberr_t PageCallback::set_zip_size ( const buf_frame_t page)

Set the tablespace compressed table size.

Returns
DB_SUCCESS if it is valie or DB_CORRUPTION if not

Field Documentation

os_file_t PageCallback::m_file

File handle to the tablespace

const char* PageCallback::m_filepath

Physical file path.

ulint PageCallback::m_page_size

The tablespace page size.

ulint PageCallback::m_zip_size

Compressed table page size


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