An implementation of page tracking service.
More...
#include <mysql_page_track_imp.h>
|
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...
|
|
An implementation of page tracking service.
◆ 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_thd | Current thread context. |
[in] | se_type | SE for which to enable tracking |
[in,out] | start_id | SE 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_id | SE 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_pages | number of pages tracked |
- Returns
- Operation status.
- Return values
-
0 | Success |
other | ER_* 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_thd | Current thread context. |
[in] | se_type | SE for which to enable tracking |
[in,out] | start_id | SE 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_id | SE 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] | buffer | allocated buffer to copy page IDs |
[in] | buffer_len | length of buffer in bytes |
[in] | cbk_func | callback function return page IDs |
[in] | cbk_ctx | caller's context for callback |
- Returns
- Operation status.
- Return values
-
0 | Success |
other | ER_* 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_thd | Current thread context. |
[in] | se_type | SE for which to enable tracking |
[out] | initial_start_id | SE specific sequence number [LSN for Innodb] which denotes the start id at which page tracking was started if it's active |
[out] | last_start_id | SE 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
-
true | if page tracking is active |
false | if 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_thd | Current thread context. |
[in] | se_type | SE for which to enable tracking |
[in,out] | purge_id | SE 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
-
0 | Success |
other | ER_* 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_thd | Current thread context. |
[in] | se_type | SE for which to enable tracking |
[out] | start_id | SE specific sequence number [LSN for InnoDB] indicating when the tracking was started |
- Returns
- Operation status.
- Return values
-
0 | Success |
other | ER_* 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_thd | Current thread context. |
[in] | se_type | SE for which to enable tracking |
[out] | stop_id | SE specific sequence number [LSN for InnoDB] indicating when the tracking was stopped |
- Returns
- Operation status.
- Return values
-
0 | Success |
other | ER_* mysql error. Get error details from THD. |
The documentation for this class was generated from the following files: