60
62
class Master_info : public Slave_reporting_capability
65
drizzle::MasterList list;
69
/* the variables below are needed because we can change masters on the fly */
70
string master_log_name;
75
uint32_t connect_retry;
66
/* the variables below are needed because we can change masters on the fly */
67
char master_log_name[FN_REFLEN];
68
char host[HOSTNAME_LENGTH+1];
69
char user[USERNAME_LENGTH+1];
70
char password[MAX_PASSWORD_LENGTH+1];
72
my_off_t master_log_pos;
73
81
File fd; // we keep the file open, so we need to remember the file pointer
76
84
pthread_mutex_t data_lock,run_lock;
77
85
pthread_cond_t data_cond,start_cond,stop_cond;
80
87
uint32_t file_id; /* for 3.23 load data infile */
81
88
Relay_log_info rli;
83
uint32_t connect_retry;
84
89
float heartbeat_period; // interface with CHANGE MASTER or master.info
85
90
uint64_t received_heartbeats; // counter of received heartbeat events
86
91
int events_till_disconnect;
100
105
long clock_diff_with_master;
106
int flush_master_info(bool flush_relay_log_cache);
107
void end_master_info();
108
void init_master_log_pos();
110
int init_master_info(const char* master_info_fname,
111
const char* slave_info_fname,
112
bool abort_if_no_master_info_file,
115
bool setUsername(const char *username);
116
const char *getUsername();
118
bool setPassword(const char *pword);
119
const char *getPassword();
121
bool setHost(const char *host, uint16_t new_port);
122
const char *getHostname();
125
off_t getLogPosition();
126
bool setLogPosition(off_t position);
128
const char *getLogName();
129
bool setLogName(const char *name);
131
uint32_t getConnectionRetry();
132
bool setConnectionRetry(uint32_t log_position);
103
void init_master_log_pos(Master_info* mi);
104
int init_master_info(Master_info* mi, const char* master_info_fname,
105
const char* slave_info_fname,
106
bool abort_if_no_master_info_file,
108
void end_master_info(Master_info* mi);
109
int flush_master_info(Master_info* mi, bool flush_relay_log_cache);
111
136
#endif /* DRIZZLED_RPL_MI_H */