24#ifndef DEFINED_RPL_REPLICA_UNTIL_OPTIONS_H
25#define DEFINED_RPL_REPLICA_UNTIL_OPTIONS_H
257 int init(
const char *gtid_set_str);
323 int init(
const char *view_id);
Represents a set of GTIDs.
Definition: rpl_gtid.h:1455
This is the abstract base class for binary log events.
Definition: log_event.h:541
Definition: rpl_rli.h:203
It implements the logic of UNTIL SQL_AFTER_GTIDS.
Definition: rpl_replica_until_options.h:292
bool check_at_start_slave() override
Definition: rpl_replica_until_options.cc:219
bool check_before_dispatching_event(const Log_event *ev) override
Definition: rpl_replica_until_options.cc:234
bool check_after_dispatching_event() override
Definition: rpl_replica_until_options.cc:238
Until_after_gtids(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:294
It implements the logic of UNTIL SQL_BEFORE_GTIDS.
Definition: rpl_replica_until_options.h:277
Until_before_gtids(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:279
bool check_at_start_slave() override
Definition: rpl_replica_until_options.cc:180
bool check_before_dispatching_event(const Log_event *ev) override
Definition: rpl_replica_until_options.cc:197
bool check_after_dispatching_event() override
Definition: rpl_replica_until_options.cc:217
It is an abstract class for UNTIL SQL_BEFORE_GTIDS and SQL_AFTER_GTIDS.
Definition: rpl_replica_until_options.h:244
int init(const char *gtid_set_str)
Initialize the until gtids when starting the slave.
Definition: rpl_replica_until_options.cc:169
Gtid_set m_gtids
Stores the gtids of START SLAVE UNTIL SQL_*_GTIDS.
Definition: rpl_replica_until_options.h:266
~Until_gtids() override=default
Until_gtids(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:268
It is for UNTIL master_log_file and master_log_pos.
Definition: rpl_replica_until_options.h:205
bool check_at_start_slave() override
Definition: rpl_replica_until_options.cc:113
bool check_before_dispatching_event(const Log_event *ev) override
Definition: rpl_replica_until_options.cc:122
Until_master_position(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:207
bool check_after_dispatching_event() override
Definition: rpl_replica_until_options.cc:148
char m_current_log_name[FN_REFLEN]
Definition: rpl_replica_until_options.h:215
my_off_t m_current_log_pos
Definition: rpl_replica_until_options.h:216
It implements the logic of UNTIL SQL_AFTER_MTS_GAP.
Definition: rpl_replica_until_options.h:352
void init()
Initialize it when starting the slave.
Definition: rpl_replica_until_options.cc:280
bool check_before_dispatching_event(const Log_event *ev) override
Definition: rpl_replica_until_options.cc:286
bool check_at_start_slave() override
Definition: rpl_replica_until_options.cc:284
bool check_after_dispatching_event() override
Definition: rpl_replica_until_options.cc:295
Until_mts_gap(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:354
This is the abstract base class for slave start until options.
Definition: rpl_replica_until_options.h:56
bool is_satisfied_after_dispatching_event()
check if the until option is satisfied after applied or dispatched a event.
Definition: rpl_replica_until_options.h:97
Until_option(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:106
virtual bool check_before_dispatching_event(const Log_event *ev)=0
Relay_log_info * m_rli
Definition: rpl_replica_until_options.h:104
bool is_satisfied_before_dispatching_event(const Log_event *ev)
check if the until option is satisfied before applying or dispatching a event.
Definition: rpl_replica_until_options.h:83
virtual bool check_at_start_slave()=0
bool is_satisfied_at_start_slave()
Check if the until option is already satisfied at coordinator starting.
Definition: rpl_replica_until_options.h:67
virtual bool check_after_dispatching_event()=0
virtual ~Until_option()=default
It is an abstract class for until master position and until relay log position.
Definition: rpl_replica_until_options.h:131
my_off_t get_until_log_pos()
Definition: rpl_replica_until_options.h:158
int init(const char *log_name, my_off_t log_pos)
Initialize the until position when starting the slave.
Definition: rpl_replica_until_options.cc:41
@ LOG_NAMES_CMP_LESS
Definition: rpl_replica_until_options.h:167
@ LOG_NAMES_CMP_GREATER
Definition: rpl_replica_until_options.h:169
@ LOG_NAMES_CMP_EQUAL
Definition: rpl_replica_until_options.h:168
@ LOG_NAMES_CMP_UNKNOWN
Definition: rpl_replica_until_options.h:166
~Until_position() override=default
const char * get_until_log_name()
Definition: rpl_replica_until_options.h:157
Until_position(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:172
ulong m_until_log_name_extension
Definition: rpl_replica_until_options.h:197
bool check_position(const char *log_name, my_off_t log_pos)
Check if until position is satisfied.
Definition: rpl_replica_until_options.cc:64
void notify_log_name_change()
Coordinator calls this function to notify that master log switch or relay log switch.
Definition: rpl_replica_until_options.h:151
enum Until_position::@147 m_log_names_cmp_result
Log name is compared only once for each master log or relay log.
char m_until_log_name[FN_REFLEN]
Definition: rpl_replica_until_options.h:189
ulonglong m_until_log_pos
Definition: rpl_replica_until_options.h:190
It is for UNTIL relay_log_file and relay_log_pos.
Definition: rpl_replica_until_options.h:228
bool check_before_dispatching_event(const Log_event *ev) override
Definition: rpl_replica_until_options.cc:160
bool check_at_start_slave() override
Definition: rpl_replica_until_options.cc:155
Until_relay_position(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:230
bool check_after_dispatching_event() override
Definition: rpl_replica_until_options.cc:164
It implements the logic for UNTIL VIEW_ID.
Definition: rpl_replica_until_options.h:307
bool until_view_id_found
Definition: rpl_replica_until_options.h:333
std::string m_view_id
Definition: rpl_replica_until_options.h:326
bool check_before_dispatching_event(const Log_event *ev) override
Definition: rpl_replica_until_options.cc:256
Until_view_id(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:309
int init(const char *view_id)
Initialize the view_id when starting the slave.
Definition: rpl_replica_until_options.cc:242
bool check_at_start_slave() override
Definition: rpl_replica_until_options.cc:254
bool until_view_id_commit_found
Definition: rpl_replica_until_options.h:340
bool check_after_dispatching_event() override
Definition: rpl_replica_until_options.cc:276
#define DBUG_TRACE
Definition: my_dbug.h:146
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
ulonglong my_off_t
Definition: my_inttypes.h:72
Common #defines and includes for file and socket I/O.
#define FN_REFLEN
Definition: my_io.h:83
Sid_map * global_sid_map
Definition: mysqld.cc:1833