MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PageCallback Struct Reference

#include <fil0fil.h>

Inheritance diagram for PageCallback:

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

Public Attributes

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.

Definition at line 847 of file fil0fil.h.

Constructor & Destructor Documentation

PageCallback::PageCallback ( )
inline

Default constructor

Definition at line 851 of file fil0fil.h.

Member Function Documentation

ulint PageCallback::get_page_size ( ) const
inline
The compressed page size
Returns
the compressed page size

Definition at line 909 of file fil0fil.h.

Here is the caller graph for this function:

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

Implemented in PageConverter, and FetchIndexRootPages.

ulint PageCallback::get_zip_size ( ) const
inline
The compressed page size
Returns
the compressed page size

Definition at line 897 of file fil0fil.h.

Here is the caller graph for this function:

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.

Implemented in AbstractCallback.

Here is the caller graph for this function:

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.

Implemented in PageConverter, and FetchIndexRootPages.

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

Definition at line 885 of file fil0fil.h.

Here is the caller graph for this function:

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

Definition at line 6257 of file fil0fil.cc.

Here is the call graph for this function:

Member Data Documentation

os_file_t PageCallback::m_file

File handle to the tablespace

Definition at line 921 of file fil0fil.h.

const char* PageCallback::m_filepath

Physical file path.

Definition at line 924 of file fil0fil.h.

ulint PageCallback::m_page_size

The tablespace page size.

Definition at line 918 of file fil0fil.h.

ulint PageCallback::m_zip_size

Compressed table page size

Definition at line 915 of file fil0fil.h.


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