Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: I don't understand how SHOW SLAVE HOSTS works

From: Guilhem Bichot <guilhem(at)mysql.com>
Date: Fri Jul 27 2007 - 08:58:28 EDT


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 
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Lead Software Engineer
/_/  /_/\_, /___/\___\_\___/   Bordeaux, France
       <___/   www.mysql.com   

-- 
MySQL Internals Mailing List
For list archives: 
http://lists.mysql.com/internals
To unsubscribe:    
http://lists.mysql.com/internals?unsub=lists@pantek.com
Received on Fri Jul 27 08:52:35 2007

This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:06:22 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library