List:Commits« Previous MessageNext Message »
From:Serge Kozlov Date:February 4 2011 7:45pm
Subject:bzr push into mysql-5.5 branch (Serge.Kozlov:3302 to 3303) Bug#43828
Bug#59494
View as plain text  
 3303 Serge Kozlov	2011-02-04
      Bug#43828, Bug#59494. 
      After introducing new way of initialization of replication the setting different heartbeat periods for slaves was missed.
      Added asserts

    modified:
      mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result
      mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test
 3302 Marc Alff	2011-02-04
      Bug#58740 Valgrind warning in PFS (pfs_setup_actor.cc)
      
      Valgrind gets confused by the call stack generated with optimized
      builds, with inlined functions.
      Reduced the stack context for the suppression in lf_pinbox_get_pins.

    modified:
      mysql-test/valgrind.supp
=== modified file 'mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result'
--- a/mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result	2010-12-19 17:15:12 +0000
+++ b/mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result	2011-02-04 19:07:48 +0000
@@ -2,13 +2,21 @@ include/rpl_init.inc [topology=1->2,1->3
 include/rpl_connect.inc [creating master]
 include/rpl_connect.inc [creating slave_1]
 include/rpl_connect.inc [creating slave_2]
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD = 0.1;
+include/start_slave.inc
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD = 1;
+include/start_slave.inc
 Slave has received heartbeat event
-slave_2 has received heartbeat event
-slave_1 has received more heartbeats than slave_2 (1 means 'yes'): 0
+include/assert.inc [slave_1 should have received more heartbeats than slave_2]
 
 include/rpl_stop_slaves.inc
 include/rpl_change_topology.inc [new topology=1->3->2]
 include/rpl_start_slaves.inc
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD=0.1;
+include/start_slave.inc
 slave_1 has received heartbeat event
 [on master]
 CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10), c LONGTEXT);
@@ -26,7 +34,7 @@ Tables_in_test
 [on master]
 creating updates on master and send to slave_2 during 5 second
 [on slave_1]
-slave_1 has received heartbeats (1 means 'yes'): 0
+include/assert.inc [slave_1 should have received heartbeats]
 
 *** Clean up ***
 DROP TABLE t1;

=== modified file 'mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test'
--- a/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test	2010-12-19 17:15:12 +0000
+++ b/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test	2011-02-04 19:07:48 +0000
@@ -20,7 +20,19 @@
 --source include/rpl_connect.inc
 
 #
-# Testing heartbeat
+# Set different heartbeat periods for slaves
+#
+--connection slave_1
+--source include/stop_slave.inc
+CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD = 0.1;
+--source include/start_slave.inc
+--connection slave_2
+--source include/stop_slave.inc
+CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD = 1;
+--source include/start_slave.inc
+
+#
+# Testing heartbeat for one master and two slaves
 #
 
 # Check that heartbeat events sent to both slaves with correct periods
@@ -35,15 +47,11 @@ let $status_var= slave_received_heartbea
 let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
 let $status_var_comparsion= >;
 --source include/wait_for_status_var.inc
-let $slave_2_rcvd_heartbeats= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
---echo slave_2 has received heartbeat event
---connection slave_1
-let $slave_1_rcvd_heartbeats= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
-let $result= query_get_value(SELECT ($slave_1_rcvd_heartbeats DIV $slave_2_rcvd_heartbeats) > 1 AS Result, Result, 1);
---echo slave_1 has received more heartbeats than slave_2 (1 means 'yes'): $result
+--let $assert_cond= [slave_1:SHOW STATUS LIKE "slave_received_heartbeats", Value, 1] > [slave_2:SHOW STATUS LIKE "slave_received_heartbeats", Value, 1]
+--let $assert_text= slave_1 should have received more heartbeats than slave_2
+--source include/assert.inc
 --echo
 
-
 # Create topology master->slave_2->slave_1 and check that slave_1
 # receives heartbeat while slave_2 gets data.
 
@@ -54,6 +62,10 @@ let $result= query_get_value(SELECT ($sl
 --let $rpl_topology= 1->3->2
 --source include/rpl_change_topology.inc
 --source include/rpl_start_slaves.inc
+--connection slave_1
+--source include/stop_slave.inc
+CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD=0.1;
+--source include/start_slave.inc
 
 # Check heartbeat for new replication channel slave_2->slave
 let $status_var= slave_received_heartbeats;
@@ -93,8 +105,6 @@ while ($i) {
     let $time_before = `SELECT NOW()`;
   }
   if (`SELECT ((1-$k)*TIMESTAMPDIFF(SECOND,'$time_before',NOW())) > 5`) {
-    --connection slave_1
-    let $slave_1_rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);    
     let $i= 0;
   }
   --connection master
@@ -104,8 +114,9 @@ while ($i) {
 --enable_query_log
 --connection slave_1
 --echo [on slave_1]
-let $result= query_get_value(SELECT ($slave_1_rcvd_heartbeats_after - $slave_1_rcvd_heartbeats_before) > 0 AS Result, Result, 1);
---echo slave_1 has received heartbeats (1 means 'yes'): $result
+--let $assert_cond= [SHOW STATUS LIKE "slave_received_heartbeats", Value, 1] > $slave_1_rcvd_heartbeats_before
+--let $assert_text= slave_1 should have received heartbeats
+--source include/assert.inc
 --echo
 
 #


Attachment: [text/bzr-bundle] bzr/serge.kozlov@oracle.com-20110204190748-7klee4l972ybtxri.bundle
Thread
bzr push into mysql-5.5 branch (Serge.Kozlov:3302 to 3303) Bug#43828Bug#59494Serge Kozlov4 Feb