MySQL 8.0.40
Source Code Documentation
FetchIndexRootPages Struct Reference

Try and determine the index root pages by checking if the next/prev pointers are both FIL_NULL. More...

Inheritance diagram for FetchIndexRootPages:
[legend]

Classes

struct  Index
 Index information gathered from the .ibd file. More...
 

Public Types

typedef std::vector< Index, ut::allocator< Index > > Indexes
 

Public Member Functions

 FetchIndexRootPages (const dict_table_t *table, trx_t *trx)
 Constructor. More...
 
 ~FetchIndexRootPages () 1 override=default
 Destructor. More...
 
space_id_t get_space_id () const 1 override
 
ulint get_space_flags () const 1 override
 
dberr_t check_row_format (uint32_t ibd_table_flags) 1
 Check if the .ibd file row format is the same as the table's. More...
 
dberr_t operator() (os_offset_t offset, buf_block_t *block) override 1
 Called for each block as it is read from the file. More...
 
dberr_t build_row_import (row_import *cfg) const 1
 Update the import configuration that will be used to import the tablespace. More...
 
- Public Member Functions inherited from AbstractCallback
 AbstractCallback (trx_t *trx)
 Constructor. More...
 
 ~AbstractCallback () override
 Free any extent descriptor instance. More...
 
dberr_t init (os_offset_t file_size, const buf_block_t *block) override 1
 Determine the page size to use for traversing the tablespace. More...
 
bool is_compressed_table () const 1
 
- Public Member Functions inherited from PageCallback
 PageCallback ()
 Default constructor. More...
 
virtual ~PageCallback () 1=default
 
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...
 
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

const dict_table_tm_table
 Table definition in server. More...
 
Indexes m_indexes
 Index information. More...
 
- Public Attributes inherited from PageCallback
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...
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractCallback
buf_frame_tget_frame (buf_block_t *block) const 1
 Get the data page depending on the table type, compressed or not. More...
 
dberr_t periodic_check () 1
 Check for session interrupt. More...
 
const xdes_txdes (ulint page_no, const page_t *page) const 1
 Get the physical offset of the extent descriptor within the page. More...
 
dberr_t set_current_xdes (page_no_t page_no, const page_t *page) 1
 Set the current page directory (xdes). More...
 
bool is_root_page (const page_t *page) const 1
 
bool is_free (page_no_t page_no) const 1
 Check if the page is marked as free in the extent descriptor. More...
 
- Protected Attributes inherited from AbstractCallback
trx_tm_trx
 Covering transaction. More...
 
space_id_t m_space
 Space id of the file being iterated over. More...
 
page_no_t m_free_limit
 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 allocated those pages to the file. More...
 
page_no_t m_size
 Current size of the space in pages. More...
 
xdes_tm_xdes
 Current extent descriptor page. More...
 
page_no_t m_xdes_page_no
 Physical page offset in the file of the extent descriptor. More...
 
uint32_t m_space_flags
 Flags value read from the header page. More...
 
uint32_t m_table_flags
 Derived from m_space_flags and row format type, the row format type is determined from the page header. More...
 

Detailed Description

Try and determine the index root pages by checking if the next/prev pointers are both FIL_NULL.

We need to ensure that skip deleted pages.

Member Typedef Documentation

◆ Indexes

Constructor & Destructor Documentation

◆ FetchIndexRootPages()

FetchIndexRootPages::FetchIndexRootPages ( const dict_table_t table,
trx_t trx 
)
inline

Constructor.

Parameters
trxcovering (user) transaction
tabletable definition in server .

◆ ~FetchIndexRootPages()

FetchIndexRootPages::~FetchIndexRootPages ( )
overridedefault

Destructor.

Member Function Documentation

◆ build_row_import()

dberr_t FetchIndexRootPages::build_row_import ( row_import cfg) const

Update the import configuration that will be used to import the tablespace.

Returns
error code or DB_SUCCESS

◆ check_row_format()

dberr_t FetchIndexRootPages::check_row_format ( uint32_t  ibd_table_flags)
inline

Check if the .ibd file row format is the same as the table's.

Parameters
ibd_table_flagsdetermined from space and page.
Returns
DB_SUCCESS or error code.

◆ get_space_flags()

ulint FetchIndexRootPages::get_space_flags ( ) const
inlineoverridevirtual
Return values
thespace flags of the tablespace being iterated over

Implements PageCallback.

◆ get_space_id()

space_id_t FetchIndexRootPages::get_space_id ( ) const
inlineoverridevirtual
Return values
thespace id of the tablespace being iterated over

Implements PageCallback.

◆ operator()()

dberr_t FetchIndexRootPages::operator() ( os_offset_t  offset,
buf_block_t block 
)
overridevirtual

Called for each block as it is read from the file.

Check index pages to determine the exact row format. We can't get that from the tablespace header flags alone.

Parameters
offsetphysical offset in the file
blockblock to convert, it is not from the buffer pool.
Return values
DB_SUCCESSor error code.

Implements PageCallback.

Member Data Documentation

◆ m_indexes

Indexes FetchIndexRootPages::m_indexes

Index information.

◆ m_table

const dict_table_t* FetchIndexRootPages::m_table

Table definition in server.


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