~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/slave.h

  • Committer: Monty Taylor
  • Date: 2008-10-23 23:53:49 UTC
  • mto: This revision was merged to the branch mainline in revision 557.
  • Revision ID: monty@inaugust.com-20081023235349-317wgwqwgccuacmq
SplitĀ outĀ nested_join.h.

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
  mi->rli does not either.
93
93
 
94
94
  In Master_info: run_lock, data_lock
95
 
  run_lock protects all information about the run state: slave_running, thd
 
95
  run_lock protects all information about the run state: slave_running, session
96
96
  and the existence of the I/O thread to stop/start it, you need this mutex).
97
97
  data_lock protects some moving members of the struct: counters (log name,
98
98
  position) and relay log (DRIZZLE_BIN_LOG object).
134
134
#define DRIZZLE_SLAVE_RUN_NOT_CONNECT 1
135
135
#define DRIZZLE_SLAVE_RUN_CONNECT     2
136
136
 
137
 
#define RPL_LOG_NAME (rli->group_master_log_name[0] ? rli->group_master_log_name :\
138
 
 "FIRST")
139
 
#define IO_RPL_LOG_NAME (mi->master_log_name[0] ? mi->master_log_name :\
140
 
 "FIRST")
 
137
#define RPL_LOG_NAME (rli->group_master_log_name.length() ? rli->group_master_log_name.c_str() : "FIRST")
 
138
#define IO_RPL_LOG_NAME (mi->getLogName() ? mi->getLogName() : "FIRST")
141
139
 
142
140
/*
143
141
  If the following is set, if first gives an error, second will be
169
167
                       bool high_priority);
170
168
 
171
169
/* If fd is -1, dump to NET */
172
 
int32_t mysql_table_dump(THD* thd, const char* db,
 
170
int32_t mysql_table_dump(Session* session, const char* db,
173
171
                     const char* tbl_name, int32_t fd = -1);
174
172
 
175
173
/* retrieve table from master and copy to slave*/
176
 
int32_t fetch_master_table(THD* thd, const char* db_name, const char* table_name,
 
174
int32_t fetch_master_table(Session* session, const char* db_name, const char* table_name,
177
175
                       Master_info* mi, DRIZZLE *drizzle, bool overwrite);
178
176
 
179
 
bool show_master_info(THD* thd, Master_info* mi);
180
 
bool show_binlog_info(THD* thd);
 
177
bool show_master_info(Session* session, Master_info* mi);
 
178
bool show_binlog_info(Session* session);
181
179
bool rpl_master_has_bug(Relay_log_info *rli, uint32_t bug_id, bool report= true);
182
 
bool rpl_master_erroneous_autoinc(THD* thd);
 
180
bool rpl_master_erroneous_autoinc(Session* session);
183
181
 
184
182
const char *print_slave_db_safe(const char *db);
185
 
int32_t check_expected_error(THD* thd, Relay_log_info const *rli, int32_t error_code);
 
183
int32_t check_expected_error(Session* session, Relay_log_info const *rli, int32_t error_code);
186
184
void skip_load_data_infile(NET* net);
187
185
 
188
186
void end_slave(); /* clean up */
196
194
                       bool need_data_lock, const char** errmsg,
197
195
                       bool look_for_description_event);
198
196
 
199
 
int32_t purge_relay_logs(Relay_log_info* rli, THD *thd, bool just_reset,
 
197
int32_t purge_relay_logs(Relay_log_info* rli, Session *session, bool just_reset,
200
198
                     const char** errmsg);
201
 
void set_slave_thread_options(THD* thd);
202
 
void set_slave_thread_default_charset(THD *thd, Relay_log_info const *rli);
 
199
void set_slave_thread_options(Session* session);
203
200
void rotate_relay_log(Master_info* mi);
204
 
int32_t apply_event_and_update_pos(Log_event* ev, THD* thd, Relay_log_info* rli,
 
201
int32_t apply_event_and_update_pos(Log_event* ev, Session* session, Relay_log_info* rli,
205
202
                               bool skip);
206
203
 
207
204
pthread_handler_t handle_slave_io(void *arg);
223
220
extern char *master_ssl_ca, *master_ssl_capath, *master_ssl_cert;
224
221
extern char *master_ssl_cipher, *master_ssl_key;
225
222
       
226
 
extern I_List<THD> threads;
 
223
extern I_List<Session> threads;
227
224
 
228
225
/* masks for start/stop operations on io and sql slave threads */
229
226
#define SLAVE_IO  1