diff options
author | unknown <hf@deer.mysql.r18.ru> | 2003-01-15 13:15:35 +0400 |
---|---|---|
committer | unknown <hf@deer.mysql.r18.ru> | 2003-01-15 13:15:35 +0400 |
commit | 150a238f033c3e3f8d67dfaa7d1616237738c1cb (patch) | |
tree | 937beb6f27e5e7958081a4a5ba13ceb2f5251396 /sql/slave.cc | |
parent | 09b79b65f225e7e7f66077f95b00e095cf454c3a (diff) | |
parent | 2d6f1c223d94fe874ac7acba089a1678f314dfac (diff) | |
download | mariadb-git-150a238f033c3e3f8d67dfaa7d1616237738c1cb.tar.gz |
resolving conflicts
BitKeeper/etc/logging_ok:
auto-union
client/mysql.cc:
Auto merged
client/mysqltest.c:
Auto merged
include/mysql.h:
Auto merged
include/mysql_com.h:
Auto merged
libmysqld/libmysqld.c:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mini_client.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/net_serv.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_error.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_help.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/log_event.cc:
Conflicts resolving
sql/log_event.h:
conflicts
sql/mysqld.cc:
conflicts
sql/opt_range.cc:
conflicts
sql/protocol.cc:
conflicts
sql/sql_show.cc:
conflicts
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 0fbf4f67846..3e28c21c9cc 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -416,6 +416,7 @@ int terminate_slave_threads(MASTER_INFO* mi,int thread_mask,bool skip_lock) } if ((thread_mask & (SLAVE_IO|SLAVE_FORCE_ALL)) && mi->slave_running) { + DBUG_PRINT("info",("Terminating IO thread")); mi->abort_slave=1; if ((error=terminate_slave_thread(mi->io_thd,io_lock, io_cond_lock, @@ -426,6 +427,7 @@ int terminate_slave_threads(MASTER_INFO* mi,int thread_mask,bool skip_lock) } if ((thread_mask & (SLAVE_SQL|SLAVE_FORCE_ALL)) && mi->rli.slave_running) { + DBUG_PRINT("info",("Terminating SQL thread")); DBUG_ASSERT(mi->rli.sql_thd != 0) ; mi->rli.abort_slave=1; if ((error=terminate_slave_thread(mi->rli.sql_thd,sql_lock, @@ -1750,7 +1752,7 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type) VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals)); #endif - if ((ulong) thd->variables.max_join_size == (ulong) HA_POS_ERROR) + if (thd->variables.max_join_size == HA_POS_ERROR) thd->options |= OPTION_BIG_SELECTS; if (thd_type == SLAVE_THD_SQL) @@ -2575,12 +2577,6 @@ static int process_io_rotate(MASTER_INFO *mi, Rotate_log_event *rev) memcpy(mi->master_log_name, rev->new_log_ident, rev->ident_len+1); mi->master_log_pos= rev->pos; - - pthread_mutex_lock(&mi->rli.data_lock); - memcpy(mi->rli.master_log_name, rev->new_log_ident, rev->ident_len+1); - mi->rli.master_log_pos= rev->pos; - pthread_mutex_unlock(&mi->rli.data_lock); - DBUG_PRINT("info", ("master_log_pos: '%s' %d", mi->master_log_name, (ulong) mi->master_log_pos)); #ifndef DBUG_OFF @@ -2968,7 +2964,12 @@ static IO_CACHE *reopen_relay_log(RELAY_LOG_INFO *rli, const char **errmsg) if ((rli->cur_log_fd=open_binlog(cur_log,rli->relay_log_name, errmsg)) <0) DBUG_RETURN(0); - my_b_seek(cur_log,rli->relay_log_pos); + /* + We want to start exactly where we was before: + relay_log_pos Current log pos + pending Number of bytes already processed from the event + */ + my_b_seek(cur_log,rli->relay_log_pos + rli->pending); DBUG_RETURN(cur_log); } |