diff options
author | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-05-09 02:03:35 +0400 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-05-09 02:03:35 +0400 |
commit | 5ef2bdea81a68a5440235bb5c841fff5dcc2b2c7 (patch) | |
tree | faf6e2793eae5ff3a0ec48cebf47e8045db0a6ff /sql/slave.cc | |
parent | e94c1ab135e035dea4c2db9508d2d635b70bcf80 (diff) | |
parent | 721ec081901b661b9338a47b3144c6c41829165a (diff) | |
download | mariadb-git-5ef2bdea81a68a5440235bb5c841fff5dcc2b2c7.tar.gz |
Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.
Conflicts:
Text conflict in mysql-test/r/grant.result
Text conflict in mysql-test/t/grant.test
Text conflict in mysys/mf_loadpath.c
Text conflict in sql/slave.cc
Text conflict in sql/sql_priv.h
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index e23763696df..6ebdea4a42a 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3124,6 +3124,11 @@ pthread_handler_t handle_slave_sql(void *arg) { THD *thd; /* needs to be first for thread_stack */ char llbuff[22],llbuff1[22]; + char saved_log_name[FN_REFLEN]; + char saved_master_log_name[FN_REFLEN]; + my_off_t saved_log_pos; + my_off_t saved_master_log_pos; + my_off_t saved_skip= 0; Relay_log_info* rli = &((Master_info*)arg)->rli; const char *errmsg; @@ -3269,6 +3274,17 @@ log '%s' at position %s, relay log '%s' position: %s", RPL_LOG_NAME, do not want to wait for next event in this case. */ mysql_mutex_lock(&rli->data_lock); + if (rli->slave_skip_counter) + { + char *pos; + pos= strmake(saved_log_name, rli->group_relay_log_name, FN_REFLEN - 1); + pos= '\0'; + pos= strmake(saved_master_log_name, rli->group_master_log_name, FN_REFLEN - 1); + pos= '\0'; + saved_log_pos= rli->group_relay_log_pos; + saved_master_log_pos= rli->group_master_log_pos; + saved_skip= rli->slave_skip_counter; + } if (rli->until_condition != Relay_log_info::UNTIL_NONE && rli->is_until_satisfied(thd, NULL)) { @@ -3287,6 +3303,21 @@ log '%s' at position %s, relay log '%s' position: %s", RPL_LOG_NAME, thd_proc_info(thd, "Reading event from the relay log"); DBUG_ASSERT(rli->sql_thd == thd); THD_CHECK_SENTRY(thd); + + if (saved_skip && rli->slave_skip_counter == 0) + { + sql_print_information("'SQL_SLAVE_SKIP_COUNTER=%ld' executed at " + "relay_log_file='%s', relay_log_pos='%ld', master_log_name='%s', " + "master_log_pos='%ld' and new position at " + "relay_log_file='%s', relay_log_pos='%ld', master_log_name='%s', " + "master_log_pos='%ld' ", + (ulong) saved_skip, saved_log_name, (ulong) saved_log_pos, + saved_master_log_name, (ulong) saved_master_log_pos, + rli->group_relay_log_name, (ulong) rli->group_relay_log_pos, + rli->group_master_log_name, (ulong) rli->group_master_log_pos); + saved_skip= 0; + } + if (exec_relay_log_event(thd,rli)) { DBUG_PRINT("info", ("exec_relay_log_event() failed")); |