24#ifndef RPL_INFO_FACTORY_H
25#define RPL_INFO_FACTORY_H
62 const char *channel_name);
74 const char *
channel,
bool convert_repo);
79 bool is_gaps_collecting_phase);
152 uint &found_rep_option,
174 std::vector<std::string> &channel_list,
uint mi_instances,
175 uint mi_repository,
const char *default_channel,
176 bool *default_channel_created_previously);
179 std::vector<std::string> &channel_list,
const char *default_channel,
180 bool *default_channel_created_previously);
Class to store all the Master_info objects of a slave to access them in the replication code base or ...
Definition: rpl_msr.h:113
Definition: rpl_rli.h:203
Definition: rpl_info_factory.h:44
static struct_file_data worker_file_data
Definition: rpl_info_factory.h:114
static struct_table_data worker_table_data
Definition: rpl_info_factory.h:113
static Relay_log_info * create_rli(uint rli_option, bool is_slave_recovery, const char *channel, bool convert_repo)
Creates a Relay log info repository whose type is defined as a parameter.
Definition: rpl_info_factory.cc:206
static Master_info * create_mi(uint rli_option, const char *channel, bool conver_repo)
Creates a Master info repository whose type is defined as a parameter.
Definition: rpl_info_factory.cc:91
static bool change_rli_repository(Relay_log_info *rli, const uint rli_option, const char **msg)
Allows to change the relay log info repository after startup.
Definition: rpl_info_factory.cc:325
static bool create_slave_info_objects(uint mi_option, uint rli_option, int thread_mask, Multisource_info *pchannel_map)
This function should be called from init_replica() only.
Definition: rpl_info_factory.cc:1108
static bool load_channel_names_from_table(std::vector< std::string > &channel_list, const char *default_channel, bool *default_channel_created_previously)
In a multisourced slave, during init_replica(), the repositories are read to initialize the slave inf...
Definition: rpl_info_factory.cc:1354
static enum_return_check check_src_repository(Rpl_info *info, uint option, Rpl_info_handler **handler_src)
This method is called by the decide_repository() and is used to check if the source repository exits.
Definition: rpl_info_factory.cc:705
static bool change_mi_repository(Master_info *mi, const uint mi_option, const char **msg)
Allows to change the master info repository after startup.
Definition: rpl_info_factory.cc:161
static bool scan_and_count_repositories(ulonglong &found_instances, uint &found_rep_option, const struct_table_data &table_data, const struct_file_data &file_data, std::string &msg)
Scan table and files for repositories.
Definition: rpl_info_factory.cc:896
static void init_repository_metadata()
Initializes startup information on different repositories.
Definition: rpl_info_factory.cc:512
static void invalidate_repository_position(Master_info *mi)
If GTID_ONLY is set for this channel, receiver and applier positions will be marked as invalid.
Definition: rpl_info_factory.cc:1444
static struct_table_data mi_table_data
Definition: rpl_info_factory.h:111
static Slave_worker * create_worker(uint rli_option, uint worker_id, Relay_log_info *rli, bool is_gaps_collecting_phase)
Creates a Slave worker repository whose type is defined as a parameter.
Definition: rpl_info_factory.cc:416
static bool configure_channel_replication_filters(Relay_log_info *rli, const char *channel_name)
Establish the relation between the channel's replication filters and the channel's Relay_log_info,...
Definition: rpl_info_factory.cc:977
static bool init_repositories(const struct_table_data &table_data, const struct_file_data &file_data, uint option, Rpl_info_handler **handler_src, Rpl_info_handler **handler_dest, const char **msg)
Creates repositories that will be associated to either the Master_info or Relay_log_info.
Definition: rpl_info_factory.cc:842
static Master_info * create_mi_and_rli_objects(uint mi_option, uint rli_option, const char *channel, bool convert_repo, Multisource_info *channel_map)
Create Master_info and Relay_log_info objects for a new channel.
Definition: rpl_info_factory.cc:1245
static bool check_error_repository(Rpl_info_handler *handler_src, Rpl_info_handler *handler_dst, enum_return_check err_src, enum_return_check err_dst, const char **msg)
This method is called by the decide_repository() and is used print out information on errors.
Definition: rpl_info_factory.cc:765
static struct_table_data rli_table_data
Definition: rpl_info_factory.h:109
static struct_file_data mi_file_data
Definition: rpl_info_factory.h:112
static bool decide_repository(Rpl_info *info, uint option, Rpl_info_handler **handler_src, Rpl_info_handler **handler_dest, const char **msg)
Decides during startup what repository will be used based on the following decision table:
Definition: rpl_info_factory.cc:589
static bool reset_workers(Relay_log_info *rli)
Delete all info from Worker info tables to render them useless in future MTS recovery,...
Definition: rpl_info_factory.cc:359
static struct_file_data rli_file_data
Definition: rpl_info_factory.h:110
static bool load_channel_names_from_repository(std::vector< std::string > &channel_list, uint mi_instances, uint mi_repository, const char *default_channel, bool *default_channel_created_previously)
Make a list of any channels that may have existed on the previous slave run.
Definition: rpl_info_factory.cc:1300
static bool scan_and_check_repositories(uint &found_rep_option, const struct_table_data &table_data, const struct_file_data &file_data, std::string &msg)
Scan table and files for repositories.
Definition: rpl_info_factory.cc:939
struct Rpl_info_factory::table_data struct_table_data
struct Rpl_info_factory::file_data struct_file_data
Definition: rpl_info_handler.h:58
Definition: rpl_info.h:43
Definition: rpl_rli_pdb.h:498
void bitmap_free(MY_BITMAP *map)
Definition: my_bitmap.cc:158
unsigned long long int ulonglong
Definition: my_inttypes.h:56
Common #defines and includes for file and socket I/O.
#define FN_REFLEN
Definition: my_io.h:83
ulong opt_mi_repository_id
Definition: sys_vars.cc:1713
ulong opt_rli_repository_id
Definition: sys_vars.cc:1723
enum_return_check
Definition: rpl_info_handler.h:51
Multisource_info channel_map
Definition: rpl_msr.cc:412
Definition: my_bitmap.h:43
Definition: rpl_info_factory.h:90
char name[FN_REFLEN]
Definition: rpl_info_factory.h:92
char pattern[FN_REFLEN]
Definition: rpl_info_factory.h:93
MY_BITMAP nullable_fields
Definition: rpl_info_factory.h:95
virtual ~file_data()
Definition: rpl_info_factory.h:96
uint n_fields
Definition: rpl_info_factory.h:91
bool name_indexed
Definition: rpl_info_factory.h:94
Definition: rpl_info_factory.h:99
virtual ~table_data()
Definition: rpl_info_factory.h:106
uint n_fields
Definition: rpl_info_factory.h:100
const char * schema
Definition: rpl_info_factory.h:101
const uint * pk_field_indexes
Definition: rpl_info_factory.h:104
const char * name
Definition: rpl_info_factory.h:102
MY_BITMAP nullable_fields
Definition: rpl_info_factory.h:105
uint n_pk_fields
Definition: rpl_info_factory.h:103
unsigned int uint
Definition: uca9-dump.cc:75