List:Internals« Previous MessageNext Message »
From:Guilhem Bichot Date:July 27 2007 12:58pm
Subject:Re: I don't understand how SHOW SLAVE HOSTS works
View as plain text  
Hello,

On Tue, Jul 17, 2007 at 09:50:51AM -0400, Baron Schwartz wrote:
> I have been trying to understand the behavior of SHOW SLAVE HOSTS, and it 
> didn't seem to match the documentation, so I went to the source and got 
> confused more :-)
> 
> I'm sure I am commiting several sins here including looking at 5.1 code 
> while running 5.0.40, but the code I'm looking at is the Doxygen-ized 5.1 
> code of sql/repl_failsafe.cc at 
> http://dev.mysql.com/sources/doxygen/mysql-5.1/repl__failsafe_8cc-source.html
> 
> So far, I find there is a hash table called slave_list, which is inserted 
> from register_slave() and read from the function (whose name I have now 
> forgotten and can't see) called by SHOW SLAVE HOSTS.
> 
> It looks to me like the command doesn't work quite like it is supposed to.  

Yes.
It is unfinished code (part of a "failsafe replication" project which
was never finished). Slaves don't disappear from the list when they
disconnect... There is also
http://bugs.mysql.com/bug.php?id=21132
and to fix this one, we are going to change the semantics of SHOW
SLAVE HOSTS, but that won't be better. I think there is a plan to
deeply rework SHOW SLAVE HOSTS but that is long-term.
So for now, my honest advice would be to not lose your time on
studying this command :-/

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Guilhem Bichot <guilhem@stripped>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Lead Software Engineer
/_/  /_/\_, /___/\___\_\___/   Bordeaux, France
       <___/   www.mysql.com   
Thread
I don't understand how SHOW SLAVE HOSTS worksBaron Schwartz17 Jul
  • Re: I don't understand how SHOW SLAVE HOSTS worksGuilhem Bichot27 Jul