MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AbstractCallback Class Reference
Inheritance diagram for AbstractCallback:
Collaboration diagram for AbstractCallback:

Public Member Functions

 AbstractCallback (trx_t *trx)
virtual ~AbstractCallback ()
virtual dberr_t init (os_offset_t file_size, const buf_block_t *block) UNIV_NOTHROW
bool is_compressed_table () const UNIV_NOTHROW
- Public Member Functions inherited from PageCallback
 PageCallback ()
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

Protected Member Functions

buf_frame_tget_frame (buf_block_t *block) const UNIV_NOTHROW
dberr_t periodic_check () UNIV_NOTHROW
const xdes_t * xdes (ulint page_no, const page_t *page) const UNIV_NOTHROW
dberr_t set_current_xdes (ulint page_no, const page_t *page) UNIV_NOTHROW
bool is_root_page (const page_t *page) const UNIV_NOTHROW
bool is_free (ulint page_no) const UNIV_NOTHROW
- Protected Member Functions inherited from PageCallback
 PageCallback (const PageCallback &)
PageCallbackoperator= (const PageCallback &)

Protected Attributes

trx_tm_trx
ulint m_space
ulint m_free_limit
ulint m_size
xdes_t * m_xdes
ulint m_xdes_page_no
ulint m_space_flags
ulint m_table_flags

Additional Inherited Members

- Public Attributes inherited from PageCallback
ulint m_zip_size
ulint m_page_size
os_file_t m_file
const char * m_filepath

Detailed Description

Functor that is called for each physical page that is read from the

tablespace file.

Definition at line 371 of file row0import.cc.

Constructor & Destructor Documentation

AbstractCallback::AbstractCallback ( trx_t trx)
inline
Constructor
Parameters
trx- covering transaction

Definition at line 375 of file row0import.cc.

virtual AbstractCallback::~AbstractCallback ( )
inlinevirtual

Free any extent descriptor instance

Definition at line 386 of file row0import.cc.

Member Function Documentation

buf_frame_t* AbstractCallback::get_frame ( buf_block_t block) const
inlineprotected

Get the data page depending on the table type, compressed or not.

Parameters
block- block read from disk
Return values
thebuffer frame

Definition at line 410 of file row0import.cc.

dberr_t AbstractCallback::init ( os_offset_t  file_size,
const buf_block_t block 
)
virtual
Determine the page size to use for traversing the tablespace
Parameters
file_size- size of the tablespace file in bytes
block- contents of the first page in the tablespace file.
Return values
DB_SUCCESSor error code.

Implements PageCallback.

Definition at line 556 of file row0import.cc.

Here is the call graph for this function:

bool AbstractCallback::is_compressed_table ( ) const
inline
Returns
true if compressed table.

Definition at line 400 of file row0import.cc.

bool AbstractCallback::is_free ( ulint  page_no) const
inlineprotected

Check if the page is marked as free in the extent descriptor.

Parameters
page_no- page number to check in the extent descriptor.
Returns
true if the page is marked as free

Definition at line 503 of file row0import.cc.

Here is the call graph for this function:

bool AbstractCallback::is_root_page ( const page_t page) const
inlineprotected
Returns
true if it is a root page

Definition at line 491 of file row0import.cc.

Here is the call graph for this function:

dberr_t AbstractCallback::periodic_check ( )
inlineprotected
Check for session interrupt. If required we could

even flush to disk here every N pages.

Return values
DB_SUCCESSor error code

Definition at line 422 of file row0import.cc.

Here is the call graph for this function:

dberr_t AbstractCallback::set_current_xdes ( ulint  page_no,
const page_t page 
)
inlineprotected

Set the current page directory (xdes). If the extent descriptor is marked as free then free the current extent descriptor and set it to 0. This implies that all pages that are covered by this extent descriptor are also freed.

Parameters
page_no- offset of page within the file
page- page contents
Returns
DB_SUCCESS or error code.

Definition at line 456 of file row0import.cc.

Here is the call graph for this function:

const xdes_t* AbstractCallback::xdes ( ulint  page_no,
const page_t page 
) const
inlineprotected

Get the physical offset of the extent descriptor within the page.

Parameters
page_no- page number of the extent descriptor
page- contents of the page containing the extent descriptor.
Returns
the start of the xdes array in a page

Definition at line 436 of file row0import.cc.

Here is the call graph for this function:

Member Data Documentation

ulint AbstractCallback::m_free_limit
protected
Minimum page number for which the free list has not been

initialized: the pages >= this limit are, by definition, free; note that in a single-table tablespace where size < 64 pages, this number is 64, i.e., we have initialized the space about the first extent, but have not physically allocted those pages to the file.

See Also
FSP_LIMIT.

Definition at line 532 of file row0import.cc.

ulint AbstractCallback::m_size
protected

Current size of the space in pages

Definition at line 535 of file row0import.cc.

ulint AbstractCallback::m_space
protected

Space id of the file being iterated over.

Definition at line 524 of file row0import.cc.

ulint AbstractCallback::m_space_flags
protected

Flags value read from the header page

Definition at line 544 of file row0import.cc.

ulint AbstractCallback::m_table_flags
protected
Derived from m_space_flags and row format type, the row format

type is determined from the page header.

Definition at line 548 of file row0import.cc.

trx_t* AbstractCallback::m_trx
protected

Covering transaction.

Definition at line 521 of file row0import.cc.

xdes_t* AbstractCallback::m_xdes
protected

Current extent descriptor page

Definition at line 538 of file row0import.cc.

ulint AbstractCallback::m_xdes_page_no
protected

Physical page offset in the file of the extent descriptor

Definition at line 541 of file row0import.cc.


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