MySQL 8.0.40
Source Code Documentation
|
It is an abstract class for until master position and until relay log position. More...
#include <rpl_replica_until_options.h>
Public Member Functions | |
~Until_position () override=default | |
int | init (const char *log_name, my_off_t log_pos) |
Initialize the until position when starting the slave. More... | |
void | notify_log_name_change () |
Coordinator calls this function to notify that master log switch or relay log switch. More... | |
const char * | get_until_log_name () |
my_off_t | get_until_log_pos () |
Public Member Functions inherited from Until_option | |
virtual | ~Until_option ()=default |
bool | is_satisfied_at_start_slave () |
Check if the until option is already satisfied at coordinator starting. More... | |
bool | is_satisfied_before_dispatching_event (const Log_event *ev) |
check if the until option is satisfied before applying or dispatching a event. More... | |
bool | is_satisfied_after_dispatching_event () |
check if the until option is satisfied after applied or dispatched a event. More... | |
Protected Types | |
enum | { LOG_NAMES_CMP_UNKNOWN = -2 , LOG_NAMES_CMP_LESS = -1 , LOG_NAMES_CMP_EQUAL = 0 , LOG_NAMES_CMP_GREATER = 1 } |
Log name is compared only once for each master log or relay log. More... | |
Protected Member Functions | |
Until_position (Relay_log_info *rli) | |
bool | check_position (const char *log_name, my_off_t log_pos) |
Check if until position is satisfied. More... | |
Protected Member Functions inherited from Until_option | |
Until_option (Relay_log_info *rli) | |
Protected Attributes | |
enum Until_position:: { ... } | m_log_names_cmp_result |
Log name is compared only once for each master log or relay log. More... | |
Protected Attributes inherited from Until_option | |
Relay_log_info * | m_rli |
Private Attributes | |
char | m_until_log_name [FN_REFLEN] |
ulonglong | m_until_log_pos |
ulong | m_until_log_name_extension |
It is an abstract class for until master position and until relay log position.
It ecapsulates the variables and functions shared by the two sort of until options.
To avoid comparing log name in every call of interface functions. An optimized comparing logic is implemented.
|
protected |
|
overridedefault |
|
inlineprotected |
|
protected |
Check if until position is satisfied.
|
inline |
|
inline |
int Until_position::init | ( | const char * | log_name, |
my_off_t | log_pos | ||
) |
Initialize the until position when starting the slave.
[in] | log_name | the log name in START SLAVE UNTIL option. |
[in] | log_pos | the log position in START SLAVE UNTIL option. |
0 | if succeeds. |
a | defined mysql error number if error happens. |
|
inline |
Coordinator calls this function to notify that master log switch or relay log switch.
enum { ... } Until_position::m_log_names_cmp_result |
Log name is compared only once for each master log or relay log.
And the comparison result is stored in m_log_names_cmp_result.
|
private |
|
private |
|
private |