163
163
bool is_fake; /* Mark that this is a fake relay log info structure */
167
167
Original log name and position of the group we're currently executing
168
168
(whose coordinates are group_relay_log_name/pos in the relay log)
169
169
in the master's binlog. These concern the *group*, because in the master's
212
212
volatile bool abort_slave;
213
213
volatile uint32_t slave_running;
216
216
Condition and its parameters from START SLAVE UNTIL clause.
218
UNTIL condition is tested with is_until_satisfied() method that is
218
UNTIL condition is tested with is_until_satisfied() method that is
219
219
called by exec_relay_log_event(). is_until_satisfied() caches the result
220
220
of the comparison of log names because log names don't change very often;
221
221
this cache is invalidated by parts of code which change log names with
222
222
notify_*_log_name_updated() methods. (They need to be called only if SQL
223
223
thread is running).
226
226
enum {UNTIL_NONE= 0, UNTIL_MASTER_POS, UNTIL_RELAY_POS} until_condition;
227
227
char until_log_name[FN_REFLEN];
228
228
uint64_t until_log_pos;
229
229
/* extension extracted from log_name and converted to int32_t */
230
uint32_t until_log_name_extension;
230
uint32_t until_log_name_extension;
232
232
Cached result of comparison of until_log_name and current log name
233
-2 means unitialised, -1,0,1 are comarison results
233
-2 means unitialised, -1,0,1 are comarison results
237
237
UNTIL_LOG_NAMES_CMP_UNKNOWN= -2, UNTIL_LOG_NAMES_CMP_LESS= -1,
238
238
UNTIL_LOG_NAMES_CMP_EQUAL= 0, UNTIL_LOG_NAMES_CMP_GREATER= 1
239
239
} until_log_names_cmp_result;
262
262
~Relay_log_info();
265
Invalidate cached until_log_name and group_relay_log_name comparison
265
Invalidate cached until_log_name and group_relay_log_name comparison
266
266
result. Should be called after any update of group_realy_log_name if
267
267
there chances that sql_thread is running.
276
The same as previous but for group_master_log_name.
276
The same as previous but for group_master_log_name.
278
278
inline void notify_group_master_log_name_update()
280
280
if (until_condition==UNTIL_MASTER_POS)
281
281
until_log_names_cmp_result= UNTIL_LOG_NAMES_CMP_UNKNOWN;
284
284
inline void inc_event_relay_log_pos()
286
286
event_relay_log_pos= future_event_relay_log_pos;
289
289
void inc_group_relay_log_pos(uint64_t log_pos,
290
290
bool skip_lock=0);
292
int32_t wait_for_pos(Session* session, String* log_name, int64_t log_pos,
292
int32_t wait_for_pos(Session* session, String* log_name, int64_t log_pos,
293
293
int64_t timeout);
294
294
void close_temporary_tables();
390
390
@retval true Replication thread is currently inside a group
391
391
@retval false Replication thread is currently not inside a group
393
bool is_in_group() const;
393
bool is_in_group() const {
394
return (sql_session->options & OPTION_BEGIN) ||
395
(m_flags & (1UL << IN_STMT));
396
399
uint32_t m_flags;