diff --git a/sql/slave.cc b/sql/slave.cc index c63af63978d..b2fc42f5e97 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -361,6 +361,7 @@ int terminate_slave_thread(THD* thd, pthread_mutex_t* term_lock, abstime.tv_sec=tv.tv_sec+2; abstime.tv_nsec=tv.tv_usec*1000; #endif + DBUG_ASSERT(cond_lock->count > 0 && cond_lock->thread == pthread_self()); pthread_cond_timedwait(term_cond, cond_lock, &abstime); if (*slave_running) KICK_SLAVE(thd); @@ -947,7 +948,6 @@ int init_relay_log_info(RELAY_LOG_INFO* rli, const char* info_fname) int info_fd; const char* msg = 0; int error = 0; - fn_format(fname, info_fname, mysql_data_home, "", 4+32); pthread_mutex_lock(&rli->data_lock); diff --git a/sql/slave.h b/sql/slave.h index 59263a96687..9d3f55cbfbf 100644 --- a/sql/slave.h +++ b/sql/slave.h @@ -157,6 +157,7 @@ typedef struct st_relay_log_info log_pos_current(0) { relay_log_name[0] = master_log_name[0] = 0; + bzero(&info_file,sizeof(info_file)); pthread_mutex_init(&run_lock, MY_MUTEX_INIT_FAST); pthread_mutex_init(&data_lock, MY_MUTEX_INIT_FAST); pthread_cond_init(&data_cond, NULL); @@ -271,6 +272,7 @@ typedef struct st_master_info st_master_info():fd(-1), io_thd(0), inited(0), old_format(0) { host[0] = 0; user[0] = 0; password[0] = 0; + bzero(&file,sizeof(file)); pthread_mutex_init(&run_lock, MY_MUTEX_INIT_FAST); pthread_mutex_init(&data_lock, MY_MUTEX_INIT_FAST); pthread_cond_init(&data_cond, NULL);