List:Commits« Previous MessageNext Message »
From:daogang.qu Date:January 17 2011 10:10am
Subject:bzr commit into mysql-trunk branch (daogang.qu:3215) WL#5493
View as plain text  
#At file:///home/daogang/bzrwork/pushwl5493/mysql-trunk-wl5493/ based on revid:daogang.qu@stripped

 3215 daogang.qu@stripped	2011-01-17
      WL#5493 Binlog crash-safe when master crashed
            
      Post fix.
     @ mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
        Updated for the patch of WL#5493.
     @ mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
        Updated for the patch of WL#5493.

    modified:
      mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
      mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
=== modified file 'mysql-test/suite/rpl/r/rpl_manual_change_index_file.result'
--- a/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result	2011-01-13 03:14:52 +0000
+++ b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result	2011-01-17 10:10:06 +0000
@@ -27,17 +27,34 @@ DROP TABLE t1, t2, t3, t4;
 # insteads of EE_FILENOTFOUND error is sent to slave, so that the slave
 # I/O thread stops immediately.
 include/rpl_reset.inc
+[ on master ]
 call mtr.add_suppression("Got fatal error 1236 from master when reading data from binary log:");
 CREATE TABLE t1(c1 int);
 DROP TABLE t1;
 FLUSH LOGS;
 CREATE TABLE t2(c1 int);
 DROP TABLE t2;
+[ on slave ]
 include/stop_slave.inc
+[ on master ]
+# This operation will result in error EE_FILENOTFOUND which happens
+# when slave IO thread is connecting to master.
+[ on slave ]
 CHANGE MASTER TO master_host='127.0.0.1', master_log_file='master-bin.000001';
 START SLAVE IO_THREAD;
+# Instead of EE_FILENOTFOUND, ER_MASTER_FATAL_ERROR_READING_BINLOG
+# and the specific information are sent to slave.
 include/wait_for_slave_io_error.inc [errno=1236]
 Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Could not open log file''
+[ on master ]
+# Restore master-bin.000001 file
+[ on slave ]
 CHANGE MASTER TO master_host='127.0.0.1', master_log_file='master-bin.000002';
 include/start_slave.inc
+[ on master ]
+CREATE TABLE t1(c1 INT);
+[ on slave ]
+SELECT * FROM t1;
+c1
+DROP TABLE t1;
 include/rpl_end.inc

=== modified file 'mysql-test/suite/rpl/t/rpl_manual_change_index_file.test'
--- a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test	2011-01-13 03:14:52 +0000
+++ b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test	2011-01-17 10:10:06 +0000
@@ -115,7 +115,7 @@ sync_slave_with_master;
 
 --source include/rpl_reset.inc
 connection master;
-
+--echo [ on master ]
 call mtr.add_suppression("Got fatal error 1236 from master when reading data from binary log:");
 let $MASTER_DATADIR= `SELECT @@DATADIR`;
 CREATE TABLE t1(c1 int);
@@ -126,30 +126,44 @@ FLUSH LOGS;
 CREATE TABLE t2(c1 int);
 DROP TABLE t2;
 sync_slave_with_master;
-
+--echo [ on slave ]
 source include/stop_slave.inc;
 
 connection master;
-# This operation will result in error EE_FILENOTFOUND which happens
-# when slave IO thread is connecting to master.
+--echo [ on master ]
+--echo # This operation will result in error EE_FILENOTFOUND which happens
+--echo # when slave IO thread is connecting to master.
 move_file $MASTER_DATADIR/master-bin.000001 $MASTER_DATADIR/master-bin.bak;
 
 connection slave;
+--echo [ on slave ]
 CHANGE MASTER TO master_host='127.0.0.1', master_log_file='master-bin.000001';
 START SLAVE IO_THREAD;
-# Instead of EE_FILENOTFOUND, ER_MASTER_FATAL_ERROR_READING_BINLOG and the
-# specific information are sent to slave.
+--echo # Instead of EE_FILENOTFOUND, ER_MASTER_FATAL_ERROR_READING_BINLOG
+--echo # and the specific information are sent to slave.
 let $slave_io_errno= 1236;
+let $show_slave_io_error= 1;
 source include/wait_for_slave_io_error.inc;
 
 connection master;
-# This operation will result in error EE_FILENOTFOUND which happens
-# when slave IO thread is connecting to master.
+--echo [ on master ]
+--echo # Restore master-bin.000001 file
 move_file $MASTER_DATADIR/master-bin.bak $MASTER_DATADIR/master-bin.000001;
 
 connection slave;
+--echo [ on slave ]
 CHANGE MASTER TO master_host='127.0.0.1', master_log_file='master-bin.000002';
 source include/start_slave.inc;
 
+connection master;
+--echo [ on master ]
+CREATE TABLE t1(c1 INT);
+sync_slave_with_master;
+--echo [ on slave ]
+SELECT * FROM t1;
+
+connection master;
+DROP TABLE t1;
+
 --source include/rpl_end.inc
 


Attachment: [text/bzr-bundle] bzr/daogang.qu@greatopensource.com-20110117101006-pf8kfekg3eebmitc.bundle
Thread
bzr commit into mysql-trunk branch (daogang.qu:3215) WL#5493daogang.qu17 Jan