List:Commits« Previous MessageNext Message »
From:Li-Bing.Song Date:October 23 2009 2:20am
Subject:bzr push into mysql-5.1-rep+2 branch (Li-Bing.Song:3136 to 3137) Bug#13963
View as plain text  
 3137 Li-Bing.Song@stripped	2009-10-23
      BUG #13963
      Postfix

    modified:
      mysql-test/suite/rpl/r/rpl_show_slave_hosts.result
      mysql-test/suite/rpl/t/rpl_show_slave_hosts.test
 3136 Li-Bing.Song@stripped	2009-10-20
            Bug#13963  	SHOW SLAVE HOSTS is unreliable
            
            Before the patch, slaves only appear in the output of SHOW SLAVE HOSTS 
            when report-host option is set. If an expected slave does not appear in  
            the list, nobody knows whether the slave does not connect or has started
            without the "report-host" option. The output also contains a strange  
            field "Rpl_recovery_rank" which has never been implemented and the manual 
            of MySQL5.4 declares that the field has been removed from MySQL5.4.
                                              
            This patch is done with these,
            According to the manual of MySQL5.4, "Rpl_recovery_rank" is removed.
            Slaves will register themselves to master no matter if report_host option is set
            or not. When slaves are registering themselves, their Server_ids, report_host
            and other information are together sent to master. Sever_ids are never null 
            and is unique in one replication group. Slaves always can be identified with  
            different Server_ids no matter if report_host exists.

    added:
      mysql-test/suite/rpl/r/rpl_show_slave_hosts.result
      mysql-test/suite/rpl/t/rpl_show_slave_hosts.cnf
      mysql-test/suite/rpl/t/rpl_show_slave_hosts.test
    modified:
      mysql-test/include/wait_show_condition.inc
      mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result
      sql/repl_failsafe.cc
      sql/slave.cc
=== modified file 'mysql-test/suite/rpl/r/rpl_show_slave_hosts.result'
--- a/mysql-test/suite/rpl/r/rpl_show_slave_hosts.result	2009-10-20 06:30:15 +0000
+++ b/mysql-test/suite/rpl/r/rpl_show_slave_hosts.result	2009-10-23 02:19:50 +0000
@@ -5,13 +5,13 @@ reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
 RESET SLAVE;
-CHANGE MASTER TO master_host='127.0.0.1',master_port=13000,master_user='root';
+CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_PORT,master_user='root';
 START SLAVE IO_THREAD;
 SHOW SLAVE HOSTS;
 Server_id	Host	Port	Master_id
-3	slave2	3306	1
-2		13001	1
+3	slave2	DEFAULT_PORT	1
+2		SLAVE_PORT	1
 STOP SLAVE IO_THREAD;
 SHOW SLAVE HOSTS;
 Server_id	Host	Port	Master_id
-2		13001	1
+2		SLAVE_PORT	1

=== modified file 'mysql-test/suite/rpl/t/rpl_show_slave_hosts.test'
--- a/mysql-test/suite/rpl/t/rpl_show_slave_hosts.test	2009-10-20 06:30:15 +0000
+++ b/mysql-test/suite/rpl/t/rpl_show_slave_hosts.test	2009-10-23 02:19:50 +0000
@@ -14,6 +14,7 @@ connect (slave2,127.0.0.1,root,,test,$SL
 
 connection slave2;
 RESET SLAVE;
+--replace_result $MASTER_MYPORT MASTER_PORT
 --eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$MASTER_MYPORT,master_user='root'
 START SLAVE IO_THREAD;
 source include/wait_for_slave_io_to_start.inc;
@@ -24,6 +25,7 @@ let $field= Server_id;
 # 3 is server_id of slave2.
 let $connection= ='3';
 source include/wait_show_condition.inc;
+--replace_result $SLAVE_MYPORT SLAVE_PORT $DEFAULT_MASTER_PORT DEFAULT_PORT
 SHOW SLAVE HOSTS;
 
 connection slave2;
@@ -39,6 +41,7 @@ let $condition= <> '3';
 # knew the leave of slave2 and has unregistered it.
 let $wait_for_all= 1;
 source include/wait_show_condition.inc;
+--replace_result $SLAVE_MYPORT SLAVE_PORT
 SHOW SLAVE HOSTS;
 
 source include/master-slave-end.inc;


Attachment: [text/bzr-bundle] bzr/li-bing.song@sun.com-20091023021950-g73dbavrhg7m2gmx.bundle
Thread
bzr push into mysql-5.1-rep+2 branch (Li-Bing.Song:3136 to 3137) Bug#13963Li-Bing.Song23 Oct