mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Renaming MASTER_INFO to Master_info in order to follow the coding
standards (and help Doxygen generating good documentation).
This commit is contained in:
32
sql/slave.h
32
sql/slave.h
@ -30,7 +30,7 @@
|
||||
|
||||
// Forward declarations
|
||||
class Relay_log_info;
|
||||
class MASTER_INFO;
|
||||
class Master_info;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
@ -42,7 +42,7 @@ class MASTER_INFO;
|
||||
I/O Thread - One of these threads is started for each master server.
|
||||
They maintain a connection to their master server, read log
|
||||
events from the master as they arrive, and queues them into
|
||||
a single, shared relay log file. A MASTER_INFO
|
||||
a single, shared relay log file. A Master_info
|
||||
represents each of these threads.
|
||||
|
||||
SQL Thread - One of these threads is started and reads from the relay log
|
||||
@ -69,18 +69,18 @@ class MASTER_INFO;
|
||||
mi->run_lock, keeps rli->run_lock, and tries to re-acquire mi->run_lock).
|
||||
|
||||
Currently active_mi never moves (it's created at startup and deleted at
|
||||
shutdown, and not changed: it always points to the same MASTER_INFO struct),
|
||||
shutdown, and not changed: it always points to the same Master_info struct),
|
||||
because we don't have multimaster. So for the moment, mi does not move, and
|
||||
mi->rli does not either.
|
||||
|
||||
In MASTER_INFO: run_lock, data_lock
|
||||
In Master_info: run_lock, data_lock
|
||||
run_lock protects all information about the run state: slave_running, and the
|
||||
existence of the I/O thread (to stop/start it, you need this mutex).
|
||||
data_lock protects some moving members of the struct: counters (log name,
|
||||
position) and relay log (MYSQL_BIN_LOG object).
|
||||
|
||||
In Relay_log_info: run_lock, data_lock
|
||||
see MASTER_INFO
|
||||
see Master_info
|
||||
|
||||
Order of acquisition: if you want to have LOCK_active_mi and a run_lock, you
|
||||
must acquire LOCK_active_mi first.
|
||||
@ -101,7 +101,7 @@ extern my_bool opt_log_slave_updates;
|
||||
extern ulonglong relay_log_space_limit;
|
||||
|
||||
/*
|
||||
3 possible values for MASTER_INFO::slave_running and
|
||||
3 possible values for Master_info::slave_running and
|
||||
Relay_log_info::slave_running.
|
||||
The values 0,1,2 are very important: to keep the diff small, I didn't
|
||||
substitute places where we use 0/1 with the newly defined symbols. So don't change
|
||||
@ -130,14 +130,14 @@ int init_slave();
|
||||
void init_slave_skip_errors(const char* arg);
|
||||
bool flush_relay_log_info(Relay_log_info* rli);
|
||||
int register_slave_on_master(MYSQL* mysql);
|
||||
int terminate_slave_threads(MASTER_INFO* mi, int thread_mask,
|
||||
int terminate_slave_threads(Master_info* mi, int thread_mask,
|
||||
bool skip_lock = 0);
|
||||
int terminate_slave_thread(THD* thd, pthread_mutex_t* term_mutex,
|
||||
pthread_mutex_t* cond_lock,
|
||||
pthread_cond_t* term_cond,
|
||||
volatile uint* slave_running);
|
||||
int start_slave_threads(bool need_slave_mutex, bool wait_for_start,
|
||||
MASTER_INFO* mi, const char* master_info_fname,
|
||||
Master_info* mi, const char* master_info_fname,
|
||||
const char* slave_info_fname, int thread_mask);
|
||||
/*
|
||||
cond_lock is usually same as start_lock. It is needed for the case when
|
||||
@ -150,7 +150,7 @@ int start_slave_thread(pthread_handler h_func, pthread_mutex_t* start_lock,
|
||||
pthread_cond_t* start_cond,
|
||||
volatile uint *slave_running,
|
||||
volatile ulong *slave_run_id,
|
||||
MASTER_INFO* mi,
|
||||
Master_info* mi,
|
||||
bool high_priority);
|
||||
|
||||
/* If fd is -1, dump to NET */
|
||||
@ -159,9 +159,9 @@ int mysql_table_dump(THD* thd, const char* db,
|
||||
|
||||
/* retrieve table from master and copy to slave*/
|
||||
int fetch_master_table(THD* thd, const char* db_name, const char* table_name,
|
||||
MASTER_INFO* mi, MYSQL* mysql, bool overwrite);
|
||||
Master_info* mi, MYSQL* mysql, bool overwrite);
|
||||
|
||||
bool show_master_info(THD* thd, MASTER_INFO* mi);
|
||||
bool show_master_info(THD* thd, Master_info* mi);
|
||||
bool show_binlog_info(THD* thd);
|
||||
bool rpl_master_has_bug(Relay_log_info *rli, uint bug_id);
|
||||
|
||||
@ -173,9 +173,9 @@ void end_slave(); /* clean up */
|
||||
void clear_until_condition(Relay_log_info* rli);
|
||||
void clear_slave_error(Relay_log_info* rli);
|
||||
void end_relay_log_info(Relay_log_info* rli);
|
||||
void lock_slave_threads(MASTER_INFO* mi);
|
||||
void unlock_slave_threads(MASTER_INFO* mi);
|
||||
void init_thread_mask(int* mask,MASTER_INFO* mi,bool inverse);
|
||||
void lock_slave_threads(Master_info* mi);
|
||||
void unlock_slave_threads(Master_info* mi);
|
||||
void init_thread_mask(int* mask,Master_info* mi,bool inverse);
|
||||
int init_relay_log_pos(Relay_log_info* rli,const char* log,ulonglong pos,
|
||||
bool need_data_lock, const char** errmsg,
|
||||
bool look_for_description_event);
|
||||
@ -184,12 +184,12 @@ int purge_relay_logs(Relay_log_info* rli, THD *thd, bool just_reset,
|
||||
const char** errmsg);
|
||||
void set_slave_thread_options(THD* thd);
|
||||
void set_slave_thread_default_charset(THD *thd, Relay_log_info const *rli);
|
||||
void rotate_relay_log(MASTER_INFO* mi);
|
||||
void rotate_relay_log(Master_info* mi);
|
||||
|
||||
pthread_handler_t handle_slave_io(void *arg);
|
||||
pthread_handler_t handle_slave_sql(void *arg);
|
||||
extern bool volatile abort_loop;
|
||||
extern MASTER_INFO main_mi, *active_mi; /* active_mi for multi-master */
|
||||
extern Master_info main_mi, *active_mi; /* active_mi for multi-master */
|
||||
extern LIST master_list;
|
||||
extern my_bool replicate_same_server_id;
|
||||
|
||||
|
Reference in New Issue
Block a user