From c47ee569159e2bf3c29901df461293aef09403ec Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Aug 2003 14:13:58 +0200 Subject: Clearer states in SHOW PROCESSLIST for replication threads. For example the Binlog_dump thread (on the master) sometimes showed "Slave:". And there were confusing messages where "binlog" was employed instead of "relay log". sql/log.cc: MYSQL_LOG::wait_for_update() is used by the binlog_dump and I/Oslave threads, and it updates thd->proc_info, so we need a bool to not show the same proc_info for 2 different things (previously we showed "Slave: etc" and that's bad for a binlog_dump thread). sql/slave.cc: Clearer thd-proc_info for slave threads. sql/sql_class.h: prototype change sql/sql_repl.cc: clearer thd->proc_info for binlog_dump thread --- sql/sql_repl.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sql/sql_repl.cc') diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 5a42614dff4..10581431c72 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -532,7 +532,7 @@ Increase max_allowed_packet on master"; if (!thd->killed) { /* Note that the following call unlocks lock_log */ - mysql_bin_log.wait_for_update(thd); + mysql_bin_log.wait_for_update(thd, 0); } else pthread_mutex_unlock(log_lock); @@ -547,7 +547,7 @@ Increase max_allowed_packet on master"; if (read_packet) { - thd->proc_info = "sending update to slave"; + thd->proc_info = "Sending binlog event to slave"; if (my_net_write(net, (char*)packet->ptr(), packet->length()) ) { errmsg = "Failed on my_net_write()"; @@ -584,7 +584,7 @@ Increase max_allowed_packet on master"; { bool loop_breaker = 0; // need this to break out of the for loop from switch - thd->proc_info = "switching to next log"; + thd->proc_info = "Finished reading one binlog; switching to next binlog"; switch (mysql_bin_log.find_next_log(&linfo, 1)) { case LOG_INFO_EOF: loop_breaker = (flags & BINLOG_DUMP_NON_BLOCK); @@ -623,14 +623,14 @@ end: (void)my_close(file, MYF(MY_WME)); send_eof(&thd->net); - thd->proc_info = "waiting to finalize termination"; + thd->proc_info = "Waiting to finalize termination"; pthread_mutex_lock(&LOCK_thread_count); thd->current_linfo = 0; pthread_mutex_unlock(&LOCK_thread_count); DBUG_VOID_RETURN; err: - thd->proc_info = "waiting to finalize termination"; + thd->proc_info = "Waiting to finalize termination"; end_io_cache(&log); /* Exclude iteration through thread list @@ -866,7 +866,7 @@ int change_master(THD* thd, MASTER_INFO* mi) DBUG_RETURN(1); } - thd->proc_info = "changing master"; + thd->proc_info = "Changing master"; LEX_MASTER_INFO* lex_mi = &thd->lex.mi; // TODO: see if needs re-write if (init_master_info(mi, master_info_file, relay_log_info_file, 0)) @@ -932,7 +932,7 @@ int change_master(THD* thd, MASTER_INFO* mi) if (need_relay_log_purge) { mi->rli.skip_log_purge= 0; - thd->proc_info="purging old relay logs"; + thd->proc_info="Purging old relay logs"; if (purge_relay_logs(&mi->rli, thd, 0 /* not only reset, but also reinit */, &errmsg)) -- cgit v1.2.1