List:Commits« Previous MessageNext Message »
From:Nuno Carvalho Date:January 30 2012 3:57pm
Subject:bzr push into mysql-trunk branch (nuno.carvalho:3805 to 3806) Bug#13613270
View as plain text  
 3806 Nuno Carvalho	2012-01-30
      BUG#13613270 - INCLUDE/WAIT_FOR_SLAVE_IO_ERROR.INC IS NOT USING INCLUDE/SHOW_SLAVE_STATUS.INC
      
      Unlike in previous versions, include/wait_for_slave_io_error.inc is not 
      using include/show_slave_status.inc duplicating test code lines and not
      taking advantage of include/show_slave_status.inc features.
      
      Changed include/wait_for_slave_io_error.inc to use 
      include/show_slave_status.inc. 
      Updated tests results that use include/wait_for_slave_io_error.inc.

    modified:
      mysql-test/include/wait_for_slave_io_error.inc
      mysql-test/suite/rpl/r/rpl_checksum.result
      mysql-test/suite/rpl/r/rpl_log_pos.result
      mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
      mysql-test/suite/rpl/r/rpl_packet.result
      mysql-test/suite/rpl/r/rpl_row_event_max_size.result
      mysql-test/suite/rpl/t/rpl_checksum.test
      mysql-test/suite/rpl/t/rpl_log_pos.test
      mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
      mysql-test/suite/rpl/t/rpl_packet.test
      mysql-test/suite/rpl/t/rpl_row_event_max_size.test
 3805 Inaam Rana	2012-01-30 [merge]
      Merge from 5.5

    modified:
      storage/innobase/os/os0file.cc
=== modified file 'mysql-test/include/wait_for_slave_io_error.inc'
--- a/mysql-test/include/wait_for_slave_io_error.inc	2012-01-19 20:03:07 +0000
+++ b/mysql-test/include/wait_for_slave_io_error.inc	2012-01-30 15:01:17 +0000
@@ -10,6 +10,7 @@
 # --let $slave_io_errno= NUMBER [, NUMBER ...]
 # [--let $show_slave_io_error= 1]
 # [--let $slave_io_error_is_nonfatal= 1]
+# [--let $slave_io_error_replace= REGEX]
 # [--let $rpl_debug= 1]
 # [--let $slave_timeout= NUMBER]
 # --source include/wait_for_slave_io_error.inc
@@ -74,11 +75,11 @@ if (`SELECT $_wfsie_errno NOT IN ($slave
 
 if ($show_slave_io_error)
 {
-  --let $_wait_for_slave_io_error_error= query_get_value("SHOW SLAVE STATUS", Last_IO_Error, 1)
-  # remove timestamp and mask absolute path
-  --replace_regex $slave_io_error_replace
-  --let $_wait_for_slave_io_error_error= `SELECT REPLACE("$_wait_for_slave_io_error_error", '$MYSQL_TEST_DIR', 'MYSQL_TEST_DIR')`
-  --echo Last_IO_Error = '$_wait_for_slave_io_error_error'
+  --let $_wait_for_slave_io_error_old_status_items= $status_items
+  --let $status_items= Last_IO_Error
+  --let $slave_field_result_replace= $slave_io_error_replace
+  --source include/show_slave_status.inc
+  --let $status_items= $_wait_for_slave_io_error_old_status_items
 }
 
 if (!$slave_io_error_is_nonfatal)

=== modified file 'mysql-test/suite/rpl/r/rpl_checksum.result'
--- a/mysql-test/suite/rpl/r/rpl_checksum.result	2011-11-19 08:08:03 +0000
+++ b/mysql-test/suite/rpl/r/rpl_checksum.result	2012-01-30 15:01:17 +0000
@@ -67,6 +67,7 @@ insert into t1 values (1) /* will not be
 set @@global.debug='d,simulate_slave_unaware_checksum';
 start 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: 'Slave can not handle replication events with the checksum that master is configured to log; the first event 'master-bin.000009' at XXX, the last event read from './master-bin.000010' at XXX, the last byte read from './master-bin.000010' at XXX.''
 select count(*) as zero from t1;
 zero
 0

=== modified file 'mysql-test/suite/rpl/r/rpl_log_pos.result'
--- a/mysql-test/suite/rpl/r/rpl_log_pos.result	2012-01-22 17:00:21 +0000
+++ b/mysql-test/suite/rpl/r/rpl_log_pos.result	2012-01-30 15:01:17 +0000
@@ -12,7 +12,7 @@ change master to master_log_pos=MASTER_L
 Read_Master_Log_Pos = '75'
 start 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: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
+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; the first event 'master-bin.000001' at XXX, the last event read from './master-bin.000001' at XXX, the last byte read from './master-bin.000001' at XXX.''
 include/stop_slave_sql.inc
 show master status;
 File	Position	Binlog_Do_DB	Binlog_Ignore_DB

=== 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	2012-01-22 17:00:21 +0000
+++ b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result	2012-01-30 15:01:17 +0000
@@ -8,7 +8,7 @@ CREATE TABLE t1(c1 INT);
 FLUSH LOGS;
 call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log');
 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 find next log; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000002' at XXX, the last byte read from 'master-bin.000002' at XXX.''
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'could not find next log; the first event 'master-bin.000001' at XXX, the last event read from './master-bin.000002' at XXX, the last byte read from './master-bin.000002' at XXX.''
 CREATE TABLE t2(c1 INT);
 FLUSH LOGS;
 CREATE TABLE t3(c1 INT);
@@ -48,6 +48,7 @@ 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 ]

=== modified file 'mysql-test/suite/rpl/r/rpl_packet.result'
--- a/mysql-test/suite/rpl/r/rpl_packet.result	2012-01-22 17:00:21 +0000
+++ b/mysql-test/suite/rpl/r/rpl_packet.result	2012-01-30 15:01:17 +0000
@@ -40,7 +40,7 @@ DROP TABLE t1;
 CREATE TABLE t1 (f1 int PRIMARY KEY, f2 LONGTEXT, f3 LONGTEXT) ENGINE=MyISAM;
 INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), REPEAT('b', @@global.max_allowed_packet));
 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; the first event '' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
+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; the first event '' at XXX, the last event read from './master-bin.000001' at XXX, the last byte read from './master-bin.000001' at XXX.''
 STOP SLAVE;
 RESET SLAVE;
 RESET MASTER;

=== 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-11-19 08:08:03 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_event_max_size.result	2012-01-30 15:01:17 +0000
@@ -66,6 +66,7 @@ call mtr.add_suppression("Found invalid
 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; the first event 'master-bin.000001' at XXX, the last event read from './master-bin.000001' at XXX, the last byte read from './master-bin.000001' at XXX.''
 ==== clean up ====
 include/stop_slave_sql.inc
 RESET SLAVE;

=== modified file 'mysql-test/suite/rpl/t/rpl_checksum.test'
--- a/mysql-test/suite/rpl/t/rpl_checksum.test	2011-10-28 21:22:19 +0000
+++ b/mysql-test/suite/rpl/t/rpl_checksum.test	2012-01-30 15:01:17 +0000
@@ -102,12 +102,9 @@ connection slave;
 set @@global.debug='d,simulate_slave_unaware_checksum';
 start slave;
 let $slave_io_errno= 1236; # ER_MASTER_FATAL_ERROR_READING_BINLOG
-#
-# Win and Unix path is printed differently: BUG#13055685. So
-# show_slave_io_error is made 0 until the bug fixes provide necessary
-# facilities
-#
---let $show_slave_io_error= 0
+--let $show_slave_io_error= 1
+# Mask line numbers
+--let $slave_io_error_replace= / at [0-9]*/ at XXX/
 source include/wait_for_slave_io_error.inc;
 
 select count(*) as zero from t1;

=== modified file 'mysql-test/suite/rpl/t/rpl_log_pos.test'
--- a/mysql-test/suite/rpl/t/rpl_log_pos.test	2012-01-19 20:03:07 +0000
+++ b/mysql-test/suite/rpl/t/rpl_log_pos.test	2012-01-30 15:01:17 +0000
@@ -23,8 +23,8 @@ source include/show_slave_status.inc;
 start slave;
 let $slave_io_errno= 1236;
 --let $show_slave_io_error= 1
-# Mask line numbers, and whether master-bin is preceded by "./" or "."
---let $slave_io_error_replace= / at [0-9]*/ at XXX/ /\.\/*master-bin/master-bin/
+# Mask line numbers
+--let $slave_io_error_replace= / at [0-9]*/ at XXX/
 source include/wait_for_slave_io_error.inc;
 source include/stop_slave_sql.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	2012-01-19 20:03:07 +0000
+++ b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test	2012-01-30 15:01:17 +0000
@@ -62,8 +62,8 @@ connection slave;
 # 1236 = ER_MASTER_FATAL_ERROR_READING_BINLOG
 --let $slave_io_errno= 1236
 --let $show_slave_io_error= 1
-# Mask line numbers, and whether master-bin is preceded by "./" or "."
---let $slave_io_error_replace= / at [0-9]*/ at XXX/ /\.\/*master-bin/master-bin/
+# Mask line numbers
+--let $slave_io_error_replace= / at [0-9]*/ at XXX/
 --source include/wait_for_slave_io_error.inc
 
 connection master;
@@ -143,14 +143,9 @@ CHANGE MASTER TO master_host='127.0.0.1'
 START SLAVE IO_THREAD;
 --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;
-#
-# Win and Unix path is printed differently: BUG#13055685. So
-# show_slave_io_error is made 0 until the bug fixes provide necessary
-# facilities
-#
-let $show_slave_io_error= 0;
-source include/wait_for_slave_io_error.inc;
+--let $slave_io_errno= 1236
+--let $show_slave_io_error= 1
+--source include/wait_for_slave_io_error.inc
 
 connection master;
 --echo [ on master ]

=== modified file 'mysql-test/suite/rpl/t/rpl_packet.test'
--- a/mysql-test/suite/rpl/t/rpl_packet.test	2012-01-19 20:03:07 +0000
+++ b/mysql-test/suite/rpl/t/rpl_packet.test	2012-01-30 15:01:17 +0000
@@ -144,8 +144,8 @@ connection slave;
 # The slave I/O thread must stop after receiving
 # 1236=ER_MASTER_FATAL_ERROR_READING_BINLOG error message from master.
 --let $slave_io_errno= 1236
-# Mask line numbers, and whether master-bin is preceded by "./" or "."
---let $slave_io_error_replace= / at [0-9]*/ at XXX/ /\.\/*master-bin/master-bin/
+# Mask line numbers
+--let $slave_io_error_replace= / at [0-9]*/ at XXX/
 --source include/wait_for_slave_io_error.inc
 
 # Remove the bad binlog and clear error status on slave.

=== 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	2011-10-28 21:22:19 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_event_max_size.test	2012-01-30 15:01:17 +0000
@@ -72,14 +72,11 @@ call mtr.add_suppression("The slave coor
 
 # Show slave last IO errno
 drop table t1;
-let $slave_io_errno= 1236;
-#
-# Win and Unix path is printed differently: BUG#13055685. So
-# show_slave_io_error is made 0 until the bug fixes provide necessary
-# facilities
-#
-let $show_slave_io_error= 0;
-source include/wait_for_slave_io_error.inc;
+--let $slave_io_errno= 1236
+--let $show_slave_io_error= 1
+# Mask line numbers
+--let $slave_io_error_replace= / at [0-9]*/ at XXX/
+--source include/wait_for_slave_io_error.inc
 
 --echo ==== clean up ====
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (nuno.carvalho:3805 to 3806) Bug#13613270Nuno Carvalho31 Jan