List:Commits« Previous MessageNext Message »
From:Pedro Gomes Date:December 4 2012 4:31pm
Subject:bzr push into mysql-trunk branch (pedro.gomes:5149 to 5150) Bug#13545447
View as plain text  
 5150 Pedro Gomes	2012-12-04 [merge]
      Bug#13545447 RPL_ROTATE_LOGS FAILS DUE TO CONCURRENCY ISSUES IN REP. CODE
      
      Merge from mysql-5.6 into mysql-trunk.

    modified:
      mysql-test/suite/rpl/r/rpl_rotate_logs.result
      mysql-test/suite/rpl/t/rpl_rotate_logs.test
 5149 Tor Didriksen	2012-12-04 [merge]
      merge 5.6 => trunk

    removed:
      unittest/gunit/mdl_mytap-t.cc
    modified:
      .bzrignore
      unittest/gunit/CMakeLists.txt
      unittest/gunit/alignment-t.cc
      unittest/gunit/bounded_queue-t.cc
      unittest/gunit/bounds_checked_array-t.cc
      unittest/gunit/byteorder-t.cc
      unittest/gunit/copy_info-t.cc
      unittest/gunit/cost_estimate-t.cc
      unittest/gunit/create_field-t.cc
      unittest/gunit/dbug-t.cc
      unittest/gunit/decimal-t.cc
      unittest/gunit/dynarray-t.cc
      unittest/gunit/field-t.cc
      unittest/gunit/field_date-t.cc
      unittest/gunit/field_datetime-t.cc
      unittest/gunit/field_long-t.cc
      unittest/gunit/field_newdecimal-t.cc
      unittest/gunit/field_timestamp-t.cc
      unittest/gunit/filesort_buffer-t.cc
      unittest/gunit/filesort_compare-t.cc
      unittest/gunit/get_diagnostics-t.cc
      unittest/gunit/gunit_test_main.cc
      unittest/gunit/handler-t.h
      unittest/gunit/insert_delayed-t.cc
      unittest/gunit/item-t.cc
      unittest/gunit/item_func_now_local-t.cc
      unittest/gunit/join_tab_sort-t.cc
      unittest/gunit/make_sortkey-t.cc
      unittest/gunit/mdl-t.cc
      unittest/gunit/my_bitmap-t.cc
      unittest/gunit/my_decimal-t.cc
      unittest/gunit/my_error-t.cc
      unittest/gunit/my_regex-t.cc
      unittest/gunit/opt_range-t.cc
      unittest/gunit/opt_trace-t.cc
      unittest/gunit/segfault-t.cc
      unittest/gunit/sql_list-t.cc
      unittest/gunit/sql_plist-t.cc
      unittest/gunit/sql_table-t.cc
      unittest/gunit/table_cache-t.cc
      unittest/gunit/test_utils.cc
      unittest/gunit/test_utils.h
      unittest/gunit/thread_utils-t.cc
      unittest/gunit/win_tests-t.cc
=== modified file 'mysql-test/suite/rpl/r/rpl_rotate_logs.result'
--- a/mysql-test/suite/rpl/r/rpl_rotate_logs.result	revid:tor.didriksen@stripped
+++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result	revid:pedro.gomes@stripped
@@ -24,10 +24,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
+# Asserted this: Table t1 should contain the first inserted line
+# Asserted this: 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);
@@ -38,9 +36,7 @@ master-bin.000001	#
 master-bin.000002	#
 master-bin.000003	#
 create table t3 select * from temp_table;
-select * from t3;
-a
-testing temporary tables
+# Asserted this: Data in t3 should be equal to temp_table
 drop table temp_table, t3;
 insert into t2 values(1234);
 set insert_id=1234;
@@ -67,28 +63,20 @@ 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
+# Asserted this: Table t2 should still contain the first inserted line after creation
+# Asserted this: Table t2 should contain the line inserted after the purge
+# Asserted this: Table t2 should still contain the second insert line after creation
+# Asserted this: Table t2 should still contain the third inserted line after creation
+# Asserted this: 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(*)
-90
+# Asserted this: Table t3 should contain 90 lines on the master
 create table t4 select * from temp_table;
-select * from t4;
-a
-testing temporary tables part 2
+# Asserted this: Data in t4 should be equal to temp_table
 include/check_slave_is_running.inc
 lock tables t3 read;
-select count(*) from t3 where n >= 4;
-count(*)
-90
+# Asserted this: Table t3 should contain 90 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:tor.didriksen@stripped
+++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.test	revid:pedro.gomes@stripped
@@ -76,7 +76,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/rpl_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/rpl_assert.inc
+
 connection master;
 flush logs;
 create table t2(m int not null auto_increment primary key);
@@ -87,7 +97,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/rpl_assert.inc
+
 connection master;
 drop table temp_table, t3;
 
@@ -146,11 +160,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/rpl_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/rpl_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/rpl_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/rpl_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/rpl_assert.inc
 
 #
 # Test forcing the replication log to rotate
-# 
+#
 
 connection master;
 create temporary table temp_table (a char(80) not null);
@@ -169,7 +202,11 @@ while ($1)
  dec $1;
 }
 enable_query_log;
-select count(*) from t3 where n >= 4;
+
+--let $assert_text= Table t3 should contain 90 lines on the master
+--let $assert_cond= [select count(*) from t3 where n >= 4,"count(*)",1] = 90
+--source include/rpl_assert.inc
+
 create table t4 select * from temp_table;
 let $last=query_get_value("SHOW MASTER STATUS", "File", 1);
 if (`select '$first' like '$last'`)
@@ -177,13 +214,21 @@ if (`select '$first' like '$last'`)
   --die No expected logs rotation
 } 
 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/rpl_assert.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 90 lines on the slave
+--let $assert_cond= [select count(*) from t3 where n >= 4,"count(*)",1] = 90
+--source include/rpl_assert.inc
+
 unlock tables;
 #clean up
 connection master;

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