List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:June 17 2011 10:53am
Subject:bzr push into mysql-next-mr-wl5569 branch (andrei.elkin:3300 to 3301) WL#5569
View as plain text  
 3301 Andrei Elkin	2011-06-17
      wl#5569 MTS
      
      fixing few tests.
      
      1. Policy is implemented for reacting with a warning in a case of failing worker leaves the total slave
      state with gaps thereby inconsistent.
      2. Two tests that were used to time out due to reset master/slave was disabled in there.
     @ mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test
        a suppression is added.
     @ mysql-test/extra/rpl_tests/rpl_row_basic.test
        a suppression is added.
     @ mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
        a suppression is added.
     @ mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
        a suppression is added.
     @ mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result
        a suppression is added.
     @ mysql-test/suite/rpl/r/rpl_row_event_max_size.result
        a suppression is added.
     @ mysql-test/suite/rpl/r/rpl_row_idempotency.result
        a suppression is added.
     @ mysql-test/suite/rpl/t/rpl_known_bugs_detection.test
        a suppression is added.
     @ mysql-test/suite/rpl/t/rpl_parallel_benchmark-slave.opt
        removing unnecessary options causing test to fail.
     @ mysql-test/suite/rpl/t/rpl_parallel_benchmark.test
        removing an erronous assignment. The former disabling of reset was intended 
        for benchmarking w/o binlog on the slave to please master-slave.inc.
     @ mysql-test/suite/rpl/t/rpl_parallel_innodb-slave.opt
        removing unnecessary options causing test to fail.
     @ mysql-test/suite/rpl/t/rpl_parallel_innodb.test
        removing an erronous assignment. The former disabling of reset was intended 
        for benchmarking w/o binlog on the slave to please master-slave.inc.
     @ mysql-test/suite/rpl/t/rpl_row_event_max_size.test
        a suppression is added.
     @ mysql-test/suite/rpl/t/rpl_row_idempotency.test
        a suppression is added.
     @ sql/rpl_slave.cc
        Downgrading error to warning in a case of Coordinator fails due to a Worker error.
        Improving messages. Merging two if:s to have just one report().
     @ sql/share/errmsg-utf8.txt
        Improved the text of an error;
        Added a new error code.

    modified:
      mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test
      mysql-test/extra/rpl_tests/rpl_row_basic.test
      mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
      mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
      mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_row_event_max_size.result
      mysql-test/suite/rpl/r/rpl_row_idempotency.result
      mysql-test/suite/rpl/t/rpl_known_bugs_detection.test
      mysql-test/suite/rpl/t/rpl_parallel_benchmark-slave.opt
      mysql-test/suite/rpl/t/rpl_parallel_benchmark.test
      mysql-test/suite/rpl/t/rpl_parallel_innodb-slave.opt
      mysql-test/suite/rpl/t/rpl_parallel_innodb.test
      mysql-test/suite/rpl/t/rpl_row_event_max_size.test
      mysql-test/suite/rpl/t/rpl_row_idempotency.test
      sql/rpl_slave.cc
      sql/share/errmsg-utf8.txt
 3300 Alfranio Correia	2011-06-17
      Removed unnecessary test cases and augment others in order to test
      recovery.

    removed:
      mysql-test/suite/rpl/r/rpl_mixed_parallel_crash_safe.result
      mysql-test/suite/rpl/r/rpl_row_parallel_crash_safe.result
      mysql-test/suite/rpl/r/rpl_stm_parallel_crash_safe.result
      mysql-test/suite/rpl/t/rpl_mixed_parallel_crash_safe-slave.opt
      mysql-test/suite/rpl/t/rpl_mixed_parallel_crash_safe.test
      mysql-test/suite/rpl/t/rpl_row_parallel_crash_safe-slave.opt
      mysql-test/suite/rpl/t/rpl_row_parallel_crash_safe.test
      mysql-test/suite/rpl/t/rpl_stm_parallel_crash_safe-slave.opt
      mysql-test/suite/rpl/t/rpl_stm_parallel_crash_safe.test
    modified:
      mysql-test/extra/rpl_tests/rpl_crash_safe.test
      mysql-test/extra/rpl_tests/rpl_mixing_engines.inc
      mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_row_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
      mysql-test/suite/rpl/t/rpl_mixed_mixing_engines.test
      mysql-test/suite/rpl/t/rpl_non_direct_mixed_mixing_engines.test
      mysql-test/suite/rpl/t/rpl_non_direct_row_mixing_engines.test
      mysql-test/suite/rpl/t/rpl_non_direct_stm_mixing_engines.test
      mysql-test/suite/rpl/t/rpl_row_crash_safe.test
      mysql-test/suite/rpl/t/rpl_row_mixing_engines.test
      mysql-test/suite/rpl/t/rpl_stm_mixed_crash_safe.test
      mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test
=== modified file 'mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test'
--- a/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test	2011-05-12 21:51:20 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test	2011-06-17 10:51:59 +0000
@@ -389,6 +389,7 @@ CALL mtr.add_suppression("Multi-statemen
 CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_stmt_cache_size' bytes of storage.*");
 CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
 CALL mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master. Message: error writing to the binary log");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
 
 connection master;
 TRUNCATE t1;

=== modified file 'mysql-test/extra/rpl_tests/rpl_row_basic.test'
--- a/mysql-test/extra/rpl_tests/rpl_row_basic.test	2011-02-23 20:01:27 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test	2011-06-17 10:51:59 +0000
@@ -385,6 +385,7 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS = @sav
 call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
 call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* Error_code: 1032");
 call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, Error_code: 1677");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
 
 --let $rpl_only_running_threads= 1
 --source include/rpl_reset.inc

=== modified file 'mysql-test/suite/rpl/r/rpl_known_bugs_detection.result'
--- a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result	2011-02-23 20:01:27 +0000
+++ b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result	2011-06-17 10:51:59 +0000
@@ -7,6 +7,7 @@ SELECT * FROM t1;
 a	b
 1	10
 2	2
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
 call mtr.add_suppression("Slave SQL.*suffer.*http:..bugs.mysql.com.bug.php.id=24432");
 include/wait_for_slave_sql_error.inc [errno=1105]
 Last_SQL_Error = 'Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10''

=== modified file 'mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result'
--- a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result	2011-02-23 20:01:27 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result	2011-06-17 10:51:59 +0000
@@ -481,6 +481,7 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS = @sav
 call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
 call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* Error_code: 1032");
 call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, Error_code: 1677");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
 include/rpl_reset.inc
 [expecting slave to replicate correctly]
 INSERT INTO t4 VALUES (1, "", 1);

=== modified file 'mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result'
--- a/mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result	2011-05-12 21:51:20 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result	2011-06-17 10:51:59 +0000
@@ -142,6 +142,7 @@ CALL mtr.add_suppression("Multi-statemen
 CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_stmt_cache_size' bytes of storage.*");
 CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
 CALL mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master. Message: error writing to the binary log");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
 TRUNCATE t1;
 SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
 SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;

=== modified file 'mysql-test/suite/rpl/r/rpl_row_event_max_size.result'
--- a/mysql-test/suite/rpl/r/rpl_row_event_max_size.result	2011-02-10 10:33:25 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_event_max_size.result	2011-06-17 10:51:59 +0000
@@ -60,6 +60,7 @@ LENGTH(data1)	LENGTH(data2)	LENGTH(data3
 drop table t1;
 call mtr.add_suppression("Slave I/O: Got fatal error 1236 from master when reading data from binary log: .*");
 call mtr.add_suppression("Found invalid event in binary log");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
 drop table t1;
 include/wait_for_slave_io_error.inc [errno=1236]
 Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master''

=== modified file 'mysql-test/suite/rpl/r/rpl_row_idempotency.result'
--- a/mysql-test/suite/rpl/r/rpl_row_idempotency.result	2011-02-23 11:54:58 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_idempotency.result	2011-06-17 10:51:59 +0000
@@ -4,6 +4,7 @@ call mtr.add_suppression("Can.t find rec
 call mtr.add_suppression("Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
 call mtr.add_suppression("Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
 call mtr.add_suppression("Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
 set @old_slave_exec_mode= @@global.slave_exec_mode;
 set @@global.slave_exec_mode= IDEMPOTENT;
 create table ti1 (b int primary key) engine = innodb;

=== modified file 'mysql-test/suite/rpl/t/rpl_known_bugs_detection.test'
--- a/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test	2011-02-23 20:01:27 +0000
+++ b/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test	2011-06-17 10:51:59 +0000
@@ -29,6 +29,8 @@ INSERT INTO t1(b) VALUES(1),(1),(2) ON D
 SELECT * FROM t1;
 connection slave;
 
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
+
 # show the error message 
 #1105 = ER_UNKNOWN_ERROR
 --let $slave_sql_errno= 1105

=== modified file 'mysql-test/suite/rpl/t/rpl_parallel_benchmark-slave.opt'
--- a/mysql-test/suite/rpl/t/rpl_parallel_benchmark-slave.opt	2011-04-02 11:32:02 +0000
+++ b/mysql-test/suite/rpl/t/rpl_parallel_benchmark-slave.opt	2011-06-17 10:51:59 +0000
@@ -1,3 +1,3 @@
---skip-log-bin --skip-log-slave-updates --log-warnings=0 --slave-transaction-retries=0
+--log-warnings=0 --slave-transaction-retries=0
 
 

=== modified file 'mysql-test/suite/rpl/t/rpl_parallel_benchmark.test'
--- a/mysql-test/suite/rpl/t/rpl_parallel_benchmark.test	2011-06-15 17:12:11 +0000
+++ b/mysql-test/suite/rpl/t/rpl_parallel_benchmark.test	2011-06-17 10:51:59 +0000
@@ -7,8 +7,6 @@
 # how to vary running configuration.
 #
 
-let $rpl_skip_reset_master_and_slave= 1;
-
 --source include/master-slave.inc
 
 connection slave;

=== modified file 'mysql-test/suite/rpl/t/rpl_parallel_innodb-slave.opt'
--- a/mysql-test/suite/rpl/t/rpl_parallel_innodb-slave.opt	2011-05-30 10:05:07 +0000
+++ b/mysql-test/suite/rpl/t/rpl_parallel_innodb-slave.opt	2011-06-17 10:51:59 +0000
@@ -1,4 +1,4 @@
---log-warnings=0 --slave-transaction-retries=0 --innodb_flush_log_at_trx_commit=0  --skip-log-bin --skip-log-slave-updates --sync_binlog=0
+--log-warnings=0 --slave-transaction-retries=0
 
 
 

=== modified file 'mysql-test/suite/rpl/t/rpl_parallel_innodb.test'
--- a/mysql-test/suite/rpl/t/rpl_parallel_innodb.test	2011-06-15 17:12:11 +0000
+++ b/mysql-test/suite/rpl/t/rpl_parallel_innodb.test	2011-06-17 10:51:59 +0000
@@ -5,8 +5,6 @@
 # checks and provides benchmarking data with load to innodb tables.
 #
 
-let $rpl_skip_reset_master_and_slave= 1;
-
 --source include/master-slave.inc
 
 connection master;

=== modified file 'mysql-test/suite/rpl/t/rpl_row_event_max_size.test'
--- a/mysql-test/suite/rpl/t/rpl_row_event_max_size.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_event_max_size.test	2011-06-17 10:51:59 +0000
@@ -68,6 +68,7 @@ drop table t1;
 connection slave;
 call mtr.add_suppression("Slave I/O: Got fatal error 1236 from master when reading data from binary log: .*");
 call mtr.add_suppression("Found invalid event in binary log");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
 
 # Show slave last IO errno
 drop table t1;

=== modified file 'mysql-test/suite/rpl/t/rpl_row_idempotency.test'
--- a/mysql-test/suite/rpl/t/rpl_row_idempotency.test	2011-02-23 11:54:58 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_idempotency.test	2011-06-17 10:51:59 +0000
@@ -13,6 +13,7 @@ call mtr.add_suppression("Can.t find rec
 call mtr.add_suppression("Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
 call mtr.add_suppression("Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
 call mtr.add_suppression("Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
 
 # bug#31609 Not all RBR slave errors reported as errors
 # bug#31552 Replication breaks when deleting rows from out-of-sync table

=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc	2011-06-15 17:12:11 +0000
+++ b/sql/rpl_slave.cc	2011-06-17 10:51:59 +0000
@@ -1091,14 +1091,14 @@ static bool sql_slave_killed(THD* thd, R
         "ignores duplicate key, key not found, and similar errors (see "
         "documentation for details).";
       char msg_stopped_mts[]=
-        "... The slave Coordinator and Worker threads are stopped, possibly "
-        "leaving data in inconsistent state. The following restart shall "
-        "restore consistency automatically. There might be exceptional situations "
-        "in the recovery caused by combination of non-transactional storage for "
-        "either of Coordinator or Workers info tables and updating non-transactional "
-        "data tables or DDL queries. In such cases you have to examine your data "
-        "(see documentation for details).";
+        "... The slave coordinator and worker threads are stopped, possibly "
+        "leaving data in inconsistent state. A restart should "
+        "restore consistency automatically, although using non-transactional "
+        "storage for data or info tables or DDL queries could lead to problems. "
+        "In such cases you have to examine your data (see documentation for "
+        "details).";
 
+      ret= TRUE;
       if (rli->abort_slave)
       {
         DBUG_PRINT("info", ("Request to stop slave SQL Thread received while "
@@ -1125,7 +1125,7 @@ static bool sql_slave_killed(THD* thd, R
                         DBUG_EXECUTE_IF("incomplete_group_in_relay_log",
                                         ret= TRUE;);); // time is over
 
-        if (ret == 0)
+        if (!ret)
         {
           rli->report(WARNING_LEVEL, 0,
                       !is_parallel_group ?
@@ -1137,18 +1137,17 @@ static bool sql_slave_killed(THD* thd, R
                       "stopped in the middle of assigning a group of events; "
                       "deferring to exit until the group completion ... ");
         }
-        else
-        {
-          rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
-                      ER(ER_SLAVE_FATAL_ERROR),
-                      !is_parallel_group ? msg_stopped : msg_stopped_mts);
-        }
       }
-      else
+      if (ret)
       {
-        ret= TRUE;
-        rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR, ER(ER_SLAVE_FATAL_ERROR),
-                    !is_parallel_group ? msg_stopped : msg_stopped_mts);
+        if (is_parallel_group)
+          rli->report(WARNING_LEVEL,
+                      ER_MTS_PARALLEL_INCONSISTENT_DATA,
+                      ER(ER_MTS_PARALLEL_INCONSISTENT_DATA),
+                      msg_stopped_mts);
+        else
+          rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
+                      ER(ER_SLAVE_FATAL_ERROR), msg_stopped);
       }
     }
     else

=== modified file 'sql/share/errmsg-utf8.txt'
--- a/sql/share/errmsg-utf8.txt	2011-06-12 19:05:05 +0000
+++ b/sql/share/errmsg-utf8.txt	2011-06-17 10:51:59 +0000
@@ -6511,4 +6511,6 @@ ER_MTS_FEATURE_IS_NOT_SUPPORTED
 ER_MTS_UPDATED_DBS_GREATER_MAX
   eng "Modified database names number exceeds the maximum %d; the names are not written into the replication event."
 ER_MTS_CANT_PARALLEL
-  eng "Can't execute the current event group in parallel mode running into event %s, relay-log name %s, position %s."
+  eng "Can't execute the current event group in parallel mode. Encountered event %s, relay-log name %s, position %s which prevents execution of this event group in parallel mode."
+ER_MTS_PARALLEL_INCONSISTENT_DATA
+  eng "%s"


Attachment: [text/bzr-bundle] bzr/andrei.elkin@oracle.com-20110617105159-azpyctgtna4mrubm.bundle
Thread
bzr push into mysql-next-mr-wl5569 branch (andrei.elkin:3300 to 3301) WL#5569Andrei Elkin19 Jun