1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

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
This commit is contained in:
unknown
2003-08-25 14:13:58 +02:00
parent 89e95d0c26
commit c47ee56915
4 changed files with 38 additions and 22 deletions

View File

@@ -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))