List:Commits« Previous MessageNext Message »
From:Sven Sandberg Date:March 17 2011 8:37am
Subject:bzr commit into mysql-5.5 branch (sven.sandberg:3372) Bug#49978 Bug#11877618
View as plain text  
#At file:///home/sven/bzr/debug-max/5.5/ based on revid:sven.sandberg@stripped

 3372 Sven Sandberg	2011-03-17
      BUG#11877618: rpl_slave_net_timeout fails in rpl_sync.inc (at sync_slave_with_master)
      Problem: the test had not been updated after BUG#49978 was pushed
      Fix: add 'set $rpl_only_running_threads= 1' to the end of the test
      and update the result file.
      Also, use include/assert.inc for an assertion (instead of relying
      on result file comparison).
      Also, move 'set @@global.slave_net_timeout' forwards, to get rid
      of a warning.
     @ mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result
        updated result file
     @ mysql-test/suite/large_tests/t/rpl_slave_net_timeout.test
         - Got rid of warning "The requested value for the heartbeat period
           exceeds the value of `slave_net_timeout' seconds. A sensible
           value for the period should be less than the timeout." by
           changing order of "set slave_net_timeout" and
           "change master to master_heartbeat_period".
         - replaced result file comparison by include/assert.inc
         - added "let $rpl_only_running_threads= 1"

    modified:
      mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result
      mysql-test/suite/large_tests/t/rpl_slave_net_timeout.test
=== modified file 'mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result'
--- a/mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result	2010-02-28 17:39:28 +0000
+++ b/mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result	2011-03-17 08:37:35 +0000
@@ -1,25 +1,20 @@
-stop slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-reset master;
-reset slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-start slave;
+include/master-slave.inc
+[connection master]
 set @save_general_log = @@global.general_log;
 set @save_log_output = @@global.log_output;
 set @save_slave_net_timeout = @@global.slave_net_timeout;
 set @@global.general_log = ON;
 set @@global.log_output = 'table,file';
 include/stop_slave.inc
-set @@global.slave_net_timeout = @@global.net_read_timeout * 2;
 change master to master_host = '127.0.0.1',master_port = MASTER_PORT,
 master_user = 'root', master_heartbeat_period = 0;
+set @@global.slave_net_timeout = @@global.net_read_timeout * 2;
 include/start_slave.inc
 include/stop_slave.inc
 select event_time from (select event_time from mysql.general_log as t_1 where command_type like 'Connect' order by event_time desc limit 2) as t_2 order by event_time desc limit 1 into @ts_last;
 select event_time from (select event_time from mysql.general_log as t_1 where command_type like 'Connect' order by event_time desc limit 2) as t_2 order by event_time asc limit 1 into @ts_prev;
-select @result as 'Must be 1';
-Must be 1
-1
+include/assert.inc [time between last reconnection and the reconnection before that should be >= slave_net_timeout]
 set @@global.general_log = @save_general_log;
 set @@global.log_output = @save_log_output;
 set @@global.slave_net_timeout = @save_slave_net_timeout;
+include/rpl_end.inc

=== modified file 'mysql-test/suite/large_tests/t/rpl_slave_net_timeout.test'
--- a/mysql-test/suite/large_tests/t/rpl_slave_net_timeout.test	2010-12-19 17:15:12 +0000
+++ b/mysql-test/suite/large_tests/t/rpl_slave_net_timeout.test	2011-03-17 08:37:35 +0000
@@ -21,11 +21,6 @@ set @@global.log_output = 'table,file';
 
 connection slave;
 --source include/stop_slave.inc
---disable_warnings
-set @@global.slave_net_timeout = @@global.net_read_timeout * 2;
---enable_warnings
-let $idle_time=`select @@global.slave_net_timeout * 2`;
-
 #
 # if heartbeat is disabled then reconnecting to the idle master
 # should happen with `slave_net_timeout' period.
@@ -42,6 +37,9 @@ let $idle_time=`select @@global.slave_ne
 eval change master to master_host = '127.0.0.1',master_port = $MASTER_MYPORT,
 master_user = 'root', master_heartbeat_period = 0;
 
+set @@global.slave_net_timeout = @@global.net_read_timeout * 2;
+let $idle_time=`select @@global.slave_net_timeout * 2`;
+
 let $slave_net_timeout = `select @@global.slave_net_timeout`;
 
 --source include/start_slave.inc
@@ -64,11 +62,9 @@ connection master;
 select event_time from (select event_time from mysql.general_log as t_1 where command_type like 'Connect' order by event_time desc limit 2) as t_2 order by event_time desc limit 1 into @ts_last;
 select event_time from (select event_time from mysql.general_log as t_1 where command_type like 'Connect' order by event_time desc limit 2) as t_2 order by event_time asc limit 1 into @ts_prev;
 
---disable_query_log
-eval select time_to_sec(@ts_last) - $slave_net_timeout >= time_to_sec(@ts_prev) into @result;
---enable_query_log
-
-select @result as 'Must be 1';
+--let $assert_cond= time_to_sec(@ts_last) - time_to_sec(@ts_prev) >= $slave_net_timeout
+--let $assert_text= time between last reconnection and the reconnection before that should be >= slave_net_timeout
+--source include/assert.inc
 
 # cleanup 
 
@@ -79,4 +75,5 @@ set @@global.log_output = @save_log_outp
 connection slave;
 set @@global.slave_net_timeout = @save_slave_net_timeout;
 
+--let $rpl_only_running_threads= 1
 --source include/rpl_end.inc


Attachment: [text/bzr-bundle] bzr/sven.sandberg@oracle.com-20110317083735-d080c8b808q6qmru.bundle
Thread
bzr commit into mysql-5.5 branch (sven.sandberg:3372) Bug#49978 Bug#11877618Sven Sandberg17 Mar
  • Re: bzr commit into mysql-5.5 branch (sven.sandberg:3372) Bug#49978Bug#11877618Luís Soares17 Mar