Public Member Functions |
bool | belongs_to_client () |
int | add_logged_gtid (rpl_sidno sidno, rpl_gno gno) |
const Gtid_set * | get_gtid_set () const |
int | init_relay_log_pos (const char *log, ulonglong pos, bool need_data_lock, const char **errmsg, bool look_for_description_event) |
void | clear_until_condition () |
void | clear_sql_delay () |
void | notify_group_relay_log_name_update () |
void | notify_group_master_log_name_update () |
void | inc_event_relay_log_pos () |
int | inc_group_relay_log_pos (ulonglong log_pos, bool need_data_lock) |
int | wait_for_pos (THD *thd, String *log_name, longlong log_pos, longlong timeout) |
int | wait_for_gtid_set (THD *thd, String *gtid, longlong timeout) |
void | close_temporary_tables () |
bool | is_until_satisfied (THD *thd, Log_event *ev) |
ulonglong | until_pos () |
bool | get_table_data (TABLE *table_arg, table_def **tabledef_var, TABLE **conv_table_var) const |
void | cached_charset_invalidate () |
bool | cached_charset_compare (char *charset) const |
void | cleanup_context (THD *, bool) |
void | slave_close_thread_tables (THD *) |
void | clear_tables_to_lock () |
int | purge_relay_logs (THD *thd, bool just_reset, const char **errmsg) |
void | init_workers (ulong) |
void | deinit_workers () |
bool | is_mts_recovery () const |
bool | is_parallel_exec () const |
bool | is_mts_in_group () |
void | reset_notified_relay_log_change () |
void | reset_notified_checkpoint (ulong, time_t, bool) |
bool | mts_finalize_recovery () |
void | cleanup_after_query () |
void | cleanup_after_session () |
int | stmt_done (my_off_t event_log_pos) |
void | set_flag (enum_state_flag flag) |
bool | get_flag (enum_state_flag flag) |
void | clear_flag (enum_state_flag flag) |
bool | is_in_group () const |
int | count_relay_log_space () |
int | rli_init_info () |
void | end_info () |
int | flush_info (bool force=FALSE) |
int | flush_current_log () |
void | set_master_info (Master_info *info) |
ulonglong | get_future_event_relay_log_pos () |
void | set_future_event_relay_log_pos (ulonglong log_pos) |
const char * | get_group_master_log_name () |
ulonglong | get_group_master_log_pos () |
void | set_group_master_log_name (const char *log_file_name) |
void | set_group_master_log_pos (ulonglong log_pos) |
const char * | get_group_relay_log_name () |
ulonglong | get_group_relay_log_pos () |
void | set_group_relay_log_name (const char *log_file_name) |
void | set_group_relay_log_name (const char *log_file_name, size_t len) |
void | set_group_relay_log_pos (ulonglong log_pos) |
const char * | get_event_relay_log_name () |
ulonglong | get_event_relay_log_pos () |
void | set_event_relay_log_name (const char *log_file_name) |
void | set_event_relay_log_name (const char *log_file_name, size_t len) |
void | set_event_relay_log_pos (ulonglong log_pos) |
const char * | get_rpl_log_name () |
ulonglong | get_future_master_log_pos () |
void | start_sql_delay (time_t delay_end) |
int32 | get_sql_delay () |
void | set_sql_delay (time_t _sql_delay) |
time_t | get_sql_delay_end () |
| Relay_log_info (bool is_slave_recovery, uint param_id) |
time_t | get_row_stmt_start_timestamp () |
time_t | set_row_stmt_start_timestamp () |
void | reset_row_stmt_start_timestamp () |
void | set_long_find_row_note_printed () |
void | unset_long_find_row_note_printed () |
bool | is_long_find_row_note_printed () |
virtual void | set_rli_description_event (Format_description_log_event *fdle) |
Format_description_log_event * | get_rli_description_event () const |
void | adapt_to_master_version (Format_description_log_event *fdle) |
void | set_rpl_info_handler (Rpl_info_handler *param_handler) |
Rpl_info_handler * | get_rpl_info_handler () |
enum_return_check | check_info () |
int | remove_info () |
int | clean_info () |
bool | is_transactional () |
bool | update_is_transactional () |
char * | get_description_info () |
bool | copy_info (Rpl_info_handler *from, Rpl_info_handler *to) |
uint | get_internal_id () |
| Slave_reporting_capability (char const *thread_name) |
virtual void | report (loglevel level, int err_code, const char *msg,...) const ATTRIBUTE_FORMAT(printf |
virtual void void | va_report (loglevel level, int err_code, const char *prefix_msg, const char *msg, va_list v_args) const |
void | clear_error () |
int | has_temporary_error (THD *thd, uint error_arg=0, bool *silent=0) const |
Error const & | last_error () const |
bool | is_error () const |
Public Attributes |
bool | replicate_same_server_id |
File | cur_log_fd |
MYSQL_BIN_LOG | relay_log |
LOG_INFO | linfo |
IO_CACHE | cache_buf |
IO_CACHE * | cur_log |
bool | is_relay_log_recovery |
TABLE * | save_temporary_tables |
Master_info * | mi |
uint32 | cur_log_old_open_count |
ulonglong | log_space_limit |
ulonglong | log_space_total |
bool | ignore_log_space_limit |
bool | sql_force_rotate_relay |
time_t | last_master_timestamp |
volatile uint32 | slave_skip_counter |
volatile ulong | abort_pos_wait |
mysql_mutex_t | log_space_lock |
mysql_cond_t | log_space_cond |
enum Relay_log_info:: { ... } | until_condition |
char | until_log_name [FN_REFLEN] |
ulonglong | until_log_pos |
ulong | until_log_name_extension |
Gtid_set | until_sql_gtids |
bool | until_sql_gtids_first_event |
enum Relay_log_info:: { ... } | until_log_names_cmp_result |
char | cached_charset [6] |
ulong | trans_retries |
ulong | retried_trans |
char | ign_master_log_name_end [FN_REFLEN] |
ulonglong | ign_master_log_pos_end |
char | slave_patternload_file [FN_REFLEN] |
size_t | slave_patternload_file_size |
struct timespec | last_clock |
RPL_TABLE_LIST * | tables_to_lock |
uint | tables_to_lock_count |
table_mapping | m_table_map |
Rows_query_log_event * | rows_query_ev |
time_t | last_event_start_time |
Deferred_log_events * | deferred_events |
bool | deferred_events_collecting |
DYNAMIC_ARRAY | workers |
volatile ulong | pending_jobs |
mysql_mutex_t | pending_jobs_lock |
mysql_cond_t | pending_jobs_cond |
ulong | mts_slave_worker_queue_len_max |
ulonglong | mts_pending_jobs_size |
ulonglong | mts_pending_jobs_size_max |
bool | mts_wq_oversize |
Slave_worker * | last_assigned_worker |
Slave_committed_queue * | gaq |
DYNAMIC_ARRAY | curr_group_assigned_parts |
DYNAMIC_ARRAY | curr_group_da |
bool | curr_group_seen_gtid |
bool | curr_group_seen_begin |
bool | curr_group_isolated |
bool | mts_end_group_sets_max_dbs |
volatile ulong | mts_wq_underrun_w_id |
volatile long | mts_wq_excess_cnt |
long | mts_worker_underrun_level |
ulong | mts_coordinator_basic_nap |
ulong | opt_slave_parallel_workers |
ulong | slave_parallel_workers |
ulong | recovery_parallel_workers |
uint | checkpoint_seqno |
uint | checkpoint_group |
MY_BITMAP | recovery_groups |
bool | recovery_groups_inited |
ulong | mts_recovery_group_cnt |
ulong | mts_recovery_index |
bool | mts_recovery_group_seen_begin |
MEM_ROOT | mts_coor_mem_root |
enum Relay_log_info:: { ... } | mts_group_status |
ulonglong | mts_events_assigned |
ulong | mts_groups_assigned |
volatile ulong | mts_wq_overrun_cnt |
ulong | wq_size_waits_cnt |
ulong | mts_wq_no_underrun_cnt |
ulong | mts_wq_overfill_cnt |
DYNAMIC_ARRAY | least_occupied_workers |
time_t | mts_last_online_stat |
bool | reported_unsafe_warning |
uchar | slave_version_split [3] |
mysql_mutex_t | data_lock |
mysql_mutex_t | run_lock |
mysql_mutex_t | sleep_lock |
mysql_cond_t | data_cond |
mysql_cond_t | start_cond |
mysql_cond_t | stop_cond |
mysql_cond_t | sleep_cond |
THD * | info_thd |
bool | inited |
volatile bool | abort_slave |
volatile uint | slave_running |
volatile ulong | slave_run_id |
int | events_until_exit |
mysql_mutex_t | err_lock |
Definition at line 104 of file rpl_rli.h.
adaptation for the slave applier to specific master versions.
The method lists rules of adaptation for the slave applier to specific master versions. It's executed right before a new master FD is set for slave appliers execution context. Comparison of the old and new version yields the adaptive actions direction. Current execution FD's version, V_0, is compared with the new being set up FD (the arg), let's call it V_1. In the case of downgrade features that are defined in [V_0, V_1-1] range (V_1 excluded) are "removed" by running the downgrade actions. In the upgrade case the featured defined in [V_0 + 1, V_1] range are "added" by running the upgrade actions.
Notice, that due to relay log may have two FD events, one the slave local and the other from the Master. That can lead to extra adapt_to_master_version() calls and in case Slave and Master are of different versions the extra two calls should compensate each other.
Also, at composing downgrade/upgrade actions keep in mind that at initialization Slave sets up FD of version 4.0 and then transits to the current server version. At transition all upgrading actions in the range of [4.0..current] are run.
- Parameters
-
fdle | a pointer to new Format Description event that is being set up for execution context. |
Definition at line 2287 of file rpl_rli.cc.
bool Relay_log_info::is_until_satisfied |
( |
THD * |
thd, |
|
|
Log_event * |
ev |
|
) |
| |
Checks if condition stated in UNTIL clause of START SLAVE is reached.
Specifically, it checks if UNTIL condition is reached. Uses caching result of last comparison of current log file name and target log file name. So cached value should be invalidated if current log file name changes (see Relay_log_info::notify_
... functions).
This caching is needed to avoid of expensive string comparisons and strtol()
conversions needed for log names comparison. We don't need to compare them each time this function is called, we only need to do this when current log name changes. If we have UNTIL_MASTER_POS
condition we need to do this only after Rotate_log_event::do_apply_event()
(which is rare, so caching gives real benifit), and if we have UNTIL_RELAY_POS
condition then we should invalidate cached comarison value after inc_group_relay_log_pos()
which called for each group of events (so we have some benefit if we have something like queries that use autoincrement or if we have transactions).
Should be called ONLY if until_condition
!=
UNTIL_NONE
!
- Parameters
-
master_beg_pos | position of the beginning of to be executed event (not log_pos member of the event that points to the beginning of the following event) |
- Return values
-
true | condition met or error happened (condition seems to have bad log file name), |
false | condition not met. |
Definition at line 1166 of file rpl_rli.cc.