MySQL 8.0.40
Source Code Documentation
Page_track_implementation Class Reference

An implementation of page tracking service. More...

#include <mysql_page_track_imp.h>

Static Public Member Functions

static int start (THD *opaque_thd, Page_Track_SE se_type, uint64_t *start_id) noexcept
 Service API to start page tracking. More...
 
static int stop (THD *opaque_thd, Page_Track_SE se_type, uint64_t *stop_id) noexcept
 Service API to stop page tracking. More...
 
static int purge (THD *opaque_thd, Page_Track_SE se_type, uint64_t *purge_id) noexcept
 Service API to purge page tracking data. More...
 
static int get_page_ids (THD *opaque_thd, Page_Track_SE se_type, uint64_t *start_id, uint64_t *stop_id, unsigned char *buffer, size_t buffer_len, Page_Track_Callback cbk_func, void *cbk_ctx) noexcept
 Service API to get tracked pages. More...
 
static int get_num_page_ids (THD *opaque_thd, Page_Track_SE se_type, uint64_t *start_id, uint64_t *stop_id, uint64_t *num_pages) noexcept
 Service API to get approximate number of pages tracked in the given range. More...
 
static int get_status (THD *opaque_thd, Page_Track_SE se_type, uint64_t *initial_start_id, uint64_t *last_start_id) noexcept
 API to check if page tracking is active or not and to return start id if it's active. More...
 

Detailed Description

An implementation of page tracking service.

Member Function Documentation

◆ get_num_page_ids()

int Page_track_implementation::get_num_page_ids ( THD opaque_thd,
Page_Track_SE  se_type,
uint64_t *  start_id,
uint64_t *  stop_id,
uint64_t *  num_pages 
)
staticnoexcept

Service API to get approximate number of pages tracked in the given range.

Parameters
[in]opaque_thdCurrent thread context.
[in]se_typeSE for which to enable tracking
[in,out]start_idSE specific sequence number [LSN for InnoDB] from where the pages tracked would be returned.
Note
the range might get expanded and the actual start_id used for the querying will be updated.
Parameters
[in,out]stop_idSE specific sequence number [LSN for InnoDB] until where the pages tracked would be returned.
Note
the range might get expanded and the actual stop_id used for the querying will be updated.
Parameters
[out]num_pagesnumber of pages tracked
Returns
Operation status.
Return values
0Success
otherER_* mysql error. Get error details from THD.

◆ get_page_ids()

int Page_track_implementation::get_page_ids ( THD opaque_thd,
Page_Track_SE  se_type,
uint64_t *  start_id,
uint64_t *  stop_id,
unsigned char *  buffer,
size_t  buffer_len,
Page_Track_Callback  cbk_func,
void *  cbk_ctx 
)
staticnoexcept

Service API to get tracked pages.

Parameters
[in]opaque_thdCurrent thread context.
[in]se_typeSE for which to enable tracking
[in,out]start_idSE specific sequence number [LSN for InnoDB] from where the pages tracked would be returned.
Note
The range might get expanded and the actual start_id used for the querying will be updated.
Parameters
[in,out]stop_idSE specific sequence number [LSN for InnoDB] until where the pages tracked would be returned.
Note
The range might get expanded and the actual stop_id used for the querying will be updated.
Parameters
[out]bufferallocated buffer to copy page IDs
[in]buffer_lenlength of buffer in bytes
[in]cbk_funccallback function return page IDs
[in]cbk_ctxcaller's context for callback
Returns
Operation status.
Return values
0Success
otherER_* mysql error. Get error details from THD.

◆ get_status()

int Page_track_implementation::get_status ( THD opaque_thd,
Page_Track_SE  se_type,
uint64_t *  initial_start_id,
uint64_t *  last_start_id 
)
staticnoexcept

API to check if page tracking is active or not and to return start id if it's active.

Parameters
[in]opaque_thdCurrent thread context.
[in]se_typeSE for which to enable tracking
[out]initial_start_idSE specific sequence number [LSN for Innodb] which denotes the start id at which page tracking was started if it's active
[out]last_start_idSE specific sequence number [LSN for Innodb] which denotes the start id the last time the start request was issued
Returns
if page tracking is active or not
Return values
trueif page tracking is active
falseif page tracking is not active

Vector of a pair of (ID, bool) where ID is the start/stop point and bool is true if the ID is a start point else false

◆ purge()

int Page_track_implementation::purge ( THD opaque_thd,
Page_Track_SE  se_type,
uint64_t *  purge_id 
)
staticnoexcept

Service API to purge page tracking data.

Parameters
[in]opaque_thdCurrent thread context.
[in]se_typeSE for which to enable tracking
[in,out]purge_idSE specific sequence number [LSN for Innodb] initially indicating till where the data needs to be purged and finally updated to until where it was actually purged
Returns
Operation status.
Return values
0Success
otherER_* mysql error. Get error details from THD.

◆ start()

int Page_track_implementation::start ( THD opaque_thd,
Page_Track_SE  se_type,
uint64_t *  start_id 
)
staticnoexcept

Service API to start page tracking.

Parameters
[in]opaque_thdCurrent thread context.
[in]se_typeSE for which to enable tracking
[out]start_idSE specific sequence number [LSN for InnoDB] indicating when the tracking was started
Returns
Operation status.
Return values
0Success
otherER_* mysql error. Get error details from THD.

◆ stop()

int Page_track_implementation::stop ( THD opaque_thd,
Page_Track_SE  se_type,
uint64_t *  stop_id 
)
staticnoexcept

Service API to stop page tracking.

Parameters
[in]opaque_thdCurrent thread context.
[in]se_typeSE for which to enable tracking
[out]stop_idSE specific sequence number [LSN for InnoDB] indicating when the tracking was stopped
Returns
Operation status.
Return values
0Success
otherER_* mysql error. Get error details from THD.

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