List:Commits« Previous MessageNext Message »
From:Pedro Gomes Date:December 4 2012 4:33pm
Subject:bzr push into mysql-5.5 branch (pedro.gomes:4091 to 4092) Bug#13545447
View as plain text  
 4092 Pedro Gomes	2012-12-04
      Bug#13545447 RPL_ROTATE_LOGS FAILS DUE TO CONCURRENCY ISSUES IN REP. CODE
      
      RPL_ROTATE_LOGS has been failing sporadically in what seems a
      problem related to routines that update the coordinates. However,
      the test lacks proper assert statments and because of this the
      debug information upon failure simply points to the content
      mismatch between the test and the result file.
      
      Not as a solution, but as a improvement to the test to better
      debug this failure, new assert statments were added to the test.
      
      @rpl_rotate_logs.test
        Added new assert statments reducing the
        dependency on the result file.
      
      @rpl_rotate_logs.result
        Added new content to the result file to
        match the test changes

    modified:
      mysql-test/suite/rpl/r/rpl_rotate_logs.result
      mysql-test/suite/rpl/t/rpl_rotate_logs.test
 4091 Manish Kumar	2012-12-04
      BUG#13812374 - RPL.RPL_REPORT_PORT FAILS OCCASIONALLY ON PB2
      
      Problem: The problem with the test is that the slave returns 
               from start_slave.inc call too early before the list
               is actually actualised. This caused the slave stale 
               data to be reported.
      
      Fix: Added a wait in the test till the slave's IO status is 
           changed to "Waiting for master to send event" which 
           which ensures the list is correctly updated.

    modified:
      mysql-test/suite/rpl/r/rpl_report_port.result
      mysql-test/suite/rpl/t/rpl_report_port.test
=== modified file 'mysql-test/suite/rpl/r/rpl_rotate_logs.result'
--- a/mysql-test/suite/rpl/r/rpl_rotate_logs.result	revid:manish.4.kumar@stripped
+++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result	revid:pedro.gomes@stripped
@@ -17,10 +17,8 @@ insert into t1 values('Could not break s
 Master_Log_File = 'master-bin.000001'
 Relay_Master_Log_File = 'master-bin.000001'
 include/check_slave_is_running.inc
-select * from t1;
-s
-Could not break slave
-Tried hard
+include/assert.inc [Table t1 should contain the first inserted line]
+include/assert.inc [Table t1 should contain the second inserted line]
 flush logs;
 create table t2(m int not null auto_increment primary key);
 insert into t2 values (34),(67),(123);
@@ -31,9 +29,7 @@ master-bin.000001	#
 master-bin.000002	#
 master-bin.000003	#
 create table t3 select * from temp_table;
-select * from t3;
-a
-testing temporary tables
+include/assert.inc [Data in t3 should be equal to temp_table]
 drop table temp_table, t3;
 insert into t2 values(1234);
 set insert_id=1234;
@@ -60,19 +56,15 @@ insert into t2 values (65);
 Master_Log_File = 'master-bin.000003'
 Relay_Master_Log_File = 'master-bin.000003'
 include/check_slave_is_running.inc
-select * from t2;
-m
-34
-65
-67
-123
-1234
+include/assert.inc [Table t2 should still contain the first inserted line after creation]
+include/assert.inc [Table t2 should contain the line inserted after the purge]
+include/assert.inc [Table t2 should still contain the second insert line after creation]
+include/assert.inc [Table t2 should still contain the third inserted line after creation]
+include/assert.inc [Table t2 should still contain the line from the duplicated key test]
 create temporary table temp_table (a char(80) not null);
 insert into temp_table values ("testing temporary tables part 2");
 create table t3 (n int);
-select count(*) from t3 where n >= 4;
-count(*)
-100
+include/assert.inc [Table t3 should contain 100 lines on the master]
 create table t4 select * from temp_table;
 show binary logs;
 Log_name	File_size
@@ -85,16 +77,12 @@ master-bin.000008	#
 show master status;
 File	Position	Binlog_Do_DB	Binlog_Ignore_DB
 master-bin.000008	#	<Binlog_Do_DB>	<Binlog_Ignore_DB>
-select * from t4;
-a
-testing temporary tables part 2
+include/assert.inc [Data in t4 should be equal to temp_table]
 Master_Log_File = 'master-bin.000008'
 Relay_Master_Log_File = 'master-bin.000008'
 include/check_slave_is_running.inc
 lock tables t3 read;
-select count(*) from t3 where n >= 4;
-count(*)
-100
+include/assert.inc [Table t3 should contain 100 lines on the slave]
 unlock tables;
 drop table if exists t1,t2,t3,t4;
 End of 4.1 tests

=== modified file 'mysql-test/suite/rpl/t/rpl_rotate_logs.test'
--- a/mysql-test/suite/rpl/t/rpl_rotate_logs.test	revid:manish.4.kumar@stripped
+++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.test	revid:pedro.gomes@stripped
@@ -66,7 +66,17 @@ sync_slave_with_master;
 let $status_items= Master_Log_File, Relay_Master_Log_File;
 source include/show_slave_status.inc;
 source include/check_slave_is_running.inc;
-select * from t1;
+
+--let $assert_text= Table t1 should contain the first inserted line
+--let $query_result= query_get_value(select * from t1, "s", 1)
+--let $assert_cond= "$query_result" = "Could not break slave"
+--source include/assert.inc
+
+--let $assert_text= Table t1 should contain the second inserted line
+--let $query_result= query_get_value(select * from t1, "s", 2)
+--let $assert_cond= "$query_result" = "Tried hard"
+--source include/assert.inc
+
 connection master;
 flush logs;
 create table t2(m int not null auto_increment primary key);
@@ -77,7 +87,11 @@ create table t3 select * from temp_table
 
 sync_slave_with_master;
 
-select * from t3;
+--let $query_result= query_get_value(select * from t3, "a", 1)
+--let $assert_text= Data in t3 should be equal to temp_table
+--let $assert_cond= "$query_result" = "testing temporary tables"
+--source include/assert.inc
+
 connection master;
 drop table temp_table, t3;
 
@@ -136,11 +150,30 @@ insert into t2 values (65);
 sync_slave_with_master;
 source include/show_slave_status.inc;
 source include/check_slave_is_running.inc;
-select * from t2;
+
+--let $assert_text= Table t2 should still contain the first inserted line after creation
+--let $assert_cond= [select * from t2,"m",1] = 34
+--source include/assert.inc
+
+--let $assert_text= Table t2 should contain the line inserted after the purge
+--let $assert_cond= [select * from t2,"m",2] = 65
+--source include/assert.inc
+
+--let $assert_text= Table t2 should still contain the second insert line after creation
+--let $assert_cond= [select * from t2,"m",3] = 67
+--source include/assert.inc
+
+--let $assert_text= Table t2 should still contain the third inserted line after creation
+--let $assert_cond= [select * from t2,"m",4] = 123
+--source include/assert.inc
+
+--let $assert_text= Table t2 should still contain the line from the duplicated key test
+--let $assert_cond= [select * from t2,"m",5] = 1234
+--source include/assert.inc
 
 #
 # Test forcing the replication log to rotate
-# 
+#
 
 connection master;
 create temporary table temp_table (a char(80) not null);
@@ -156,19 +189,31 @@ while ($1)
  dec $1;
 }
 enable_query_log;
-select count(*) from t3 where n >= 4;
+
+--let $assert_text= Table t3 should contain 100 lines on the master
+--let $assert_cond= [select count(*) from t3 where n >= 4,"count(*)",1] = 100
+--source include/assert.inc
+
 create table t4 select * from temp_table;
 source include/show_binary_logs.inc;
 source include/show_master_status.inc;
 sync_slave_with_master;
-select * from t4;
+
+--let $query_result= query_get_value(select * from t4, "a", 1)
+--let $assert_text= Data in t4 should be equal to temp_table
+--let $assert_cond= "$query_result" = "testing temporary tables part 2"
+--source include/assert.inc
 
 source include/show_slave_status.inc;
 source include/check_slave_is_running.inc;
 # because of concurrent insert, the table may not be up to date
 # if we do not lock
 lock tables t3 read;
-select count(*) from t3 where n >= 4;
+
+--let $assert_text= Table t3 should contain 100 lines on the slave
+--let $assert_cond= [select count(*) from t3 where n >= 4,"count(*)",1] = 100
+--source include/assert.inc
+
 unlock tables;
 #clean up
 connection master;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5 branch (pedro.gomes:4091 to 4092) Bug#13545447Pedro Gomes4 Dec