List:Commits« Previous MessageNext Message »
From:Nuno Carvalho Date:January 19 2012 5:36pm
Subject:bzr push into mysql-5.5 branch (nuno.carvalho:3692 to 3693) Bug#13050593
View as plain text  
 3693 Nuno Carvalho	2012-01-19
      BUG#13050593 - BACKSLASH SWALLOWED BY INCLUDE/SHOW_SLAVE_STATUS.INC
      
      If an error message contains '\' backslash it is displayed correctly
      through show-slave-status or
      query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1);. But when
      SELECT REPLACE(...) is applied backslash is escaped resulting in a
      different test output.
      
      Disabled backslash escape on show_slave_status.inc and replaced '\' for
      '/' using replace_regex function in order to achieve the same test
      output when different path separators are used.

    modified:
      mysql-test/extra/rpl_tests/rpl_start_stop_slave.test
      mysql-test/include/show_slave_status.inc
      mysql-test/include/wait_for_slave_io_error.inc
      mysql-test/suite/rpl/r/rpl_cant_read_event_incident.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_stm_start_stop_slave.result
      mysql-test/suite/rpl/t/rpl_cant_read_event_incident.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
 3692 Inaam Rana	2012-01-19
      Bug#11765450 58421: INNODB TEMPORARY TABLE CRASH WHEN TMPDIR ON LINUX TMPFS
      
      rb://898
      approved by: Marko Makela
      
      On some kernel versions native aio operations are not supported on
      tmpfs. Check this during start up and fall back to simulated aio.

    modified:
      storage/innobase/os/os0file.c
=== modified file 'mysql-test/extra/rpl_tests/rpl_start_stop_slave.test'
--- a/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test	2012-01-17 22:16:19 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test	2012-01-19 16:56:43 +0000
@@ -199,7 +199,7 @@ START SLAVE;
 --let $slave_param_value=1236
 --source include/wait_for_slave_param.inc
 
---let $slave_io_error_replace= / at [0-9]*/ at XXX/ /\.\/*master-bin/master-bin/
+--let $slave_field_result_replace= / at [0-9]*/ at XXX/
 --let $status_items= Last_IO_Errno, Last_IO_Error
 --source include/show_slave_status.inc
 

=== modified file 'mysql-test/include/show_slave_status.inc'
--- a/mysql-test/include/show_slave_status.inc	2012-01-04 15:16:17 +0000
+++ b/mysql-test/include/show_slave_status.inc	2012-01-19 16:56:43 +0000
@@ -56,10 +56,17 @@
 #
 #       --let $status_items= Master_Log_File, Relay_Master_Log_File
 #
-#   $slave_io_error_replace
+#   $slave_field_result_replace
 #     If set, one or more regex patterns for replacing variable
 #     text in the error message. Syntax as --replace-regex
 #
+#   $slave_sql_mode
+#     If set, change the slave sql mode during this macro, reverting
+#     to the previous on exit. Default sql_mode is NO_BACKSLASH_ESCAPES
+#     to allow replace '\' by '/' making paths OS independent. Example:
+#
+#       --let $slave_sql_mode= NO_BACKSLASH_ESCAPES
+#
 
 
 --let $_show_slave_status_items=$status_items
@@ -69,13 +76,30 @@ if (!$status_items)
 }
 
 
+--let $_slave_sql_mode= NO_BACKSLASH_ESCAPES
+if ($slave_sql_mode)
+{
+  --let $_slave_sql_mode= $slave_sql_mode
+}
+--let $_previous_slave_sql_mode = `SELECT @@sql_mode`
+--disable_query_log
+eval SET sql_mode= '$_slave_sql_mode';
+--enable_query_log
+
+
 while ($_show_slave_status_items) 
 {
   --let $_show_slave_status_name= `SELECT SUBSTRING_INDEX('$_show_slave_status_items', ',', 1)`
   --let $_show_slave_status_items= `SELECT LTRIM(SUBSTRING('$_show_slave_status_items', LENGTH('$_show_slave_status_name') + 2))`
 
   --let $_show_slave_status_value= query_get_value(SHOW SLAVE STATUS, $_show_slave_status_name, 1)
-  --replace_regex $slave_io_error_replace
+  --let $_slave_field_result_replace= /[\\]/\// $slave_field_result_replace
+  --replace_regex $_slave_field_result_replace
   --let $_show_slave_status_value= `SELECT REPLACE("$_show_slave_status_value", '$MYSQL_TEST_DIR', 'MYSQL_TEST_DIR')`
   --echo $_show_slave_status_name = '$_show_slave_status_value'
 }
+
+
+--disable_query_log
+eval SET sql_mode= '$_previous_slave_sql_mode';
+--enable_query_log

=== modified file 'mysql-test/include/wait_for_slave_io_error.inc'
--- a/mysql-test/include/wait_for_slave_io_error.inc	2012-01-04 15:16:17 +0000
+++ b/mysql-test/include/wait_for_slave_io_error.inc	2012-01-19 16:56:43 +0000
@@ -76,6 +76,7 @@ if ($show_slave_io_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
 }

=== modified file 'mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result'
--- a/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result	2012-01-17 22:16:19 +0000
+++ b/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result	2012-01-19 16:56:43 +0000
@@ -11,7 +11,7 @@ reset slave;
 start slave;
 include/wait_for_slave_param.inc [Last_IO_Errno]
 Last_IO_Errno = '1236'
-Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the start event position from '' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was read from 'master-bin.000001' at XXX.''
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the start event position from '' at XXX, the last event was read from './master-bin.000001' at XXX, the last byte read was read from './master-bin.000001' at XXX.''
 reset master;
 stop slave;
 reset slave;

=== modified file 'mysql-test/suite/rpl/r/rpl_log_pos.result'
--- a/mysql-test/suite/rpl/r/rpl_log_pos.result	2012-01-17 22:16:19 +0000
+++ b/mysql-test/suite/rpl/r/rpl_log_pos.result	2012-01-19 16:56:43 +0000
@@ -9,7 +9,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 start event position from 'master-bin.000001' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was 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 start event position from 'master-bin.000001' at XXX, the last event was read from './master-bin.000001' at XXX, the last byte read was 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-17 22:16:19 +0000
+++ b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result	2012-01-19 16:56:43 +0000
@@ -5,7 +5,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 start event position from 'master-bin.000001' at XXX, the last event was read from 'master-bin.000002' at XXX, the last byte read was 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 start event position from 'master-bin.000001' at XXX, the last event was read from './master-bin.000002' at XXX, the last byte read was read from './master-bin.000002' at XXX.''
 CREATE TABLE t2(c1 INT);
 FLUSH LOGS;
 CREATE TABLE t3(c1 INT);

=== modified file 'mysql-test/suite/rpl/r/rpl_packet.result'
--- a/mysql-test/suite/rpl/r/rpl_packet.result	2012-01-17 22:16:19 +0000
+++ b/mysql-test/suite/rpl/r/rpl_packet.result	2012-01-19 16:56:43 +0000
@@ -37,7 +37,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 start event position from '' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was 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 start event position from '' at XXX, the last event was read from './master-bin.000001' at XXX, the last byte read was read from './master-bin.000001' at XXX.''
 STOP SLAVE;
 RESET SLAVE;
 RESET MASTER;

=== modified file 'mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result	2012-01-17 22:16:19 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result	2012-01-19 16:56:43 +0000
@@ -75,7 +75,7 @@ CHANGE MASTER TO master_log_pos=MASTER_P
 START SLAVE;
 include/wait_for_slave_param.inc [Last_IO_Errno]
 Last_IO_Errno = '1236'
-Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the start event position from 'master-bin.000001' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was read from 'master-bin.000001' at XXX.''
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the start event position from 'master-bin.000001' at XXX, the last event was read from './master-bin.000001' at XXX, the last byte read was read from './master-bin.000001' at XXX.''
 include/stop_slave.inc
 RESET SLAVE;
 RESET MASTER;

=== modified file 'mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test'
--- a/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test	2012-01-17 22:16:19 +0000
+++ b/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test	2012-01-19 16:56:43 +0000
@@ -14,11 +14,6 @@
 
 --source include/master-slave.inc
 --source include/have_binlog_format_mixed.inc
-#
-# Bug#13050593 swallows `\' from  Last_IO_Error
-# todo: uncomment the filter once the bug is fixed.
-#
---source include/not_windows.inc
 
 call mtr.add_suppression("Error in Log_event::read_log_event()");
 
@@ -51,7 +46,7 @@ start slave;
 --let $slave_param_value=1236
 --source include/wait_for_slave_param.inc
 
---let $slave_io_error_replace= / at [0-9]*/ at XXX/ /\.\/*master-bin/master-bin/
+--let $slave_field_result_replace= / at [0-9]*/ at XXX/
 --let $status_items= Last_IO_Errno, Last_IO_Error
 --source include/show_slave_status.inc
 

=== modified file 'mysql-test/suite/rpl/t/rpl_log_pos.test'
--- a/mysql-test/suite/rpl/t/rpl_log_pos.test	2012-01-04 15:16:17 +0000
+++ b/mysql-test/suite/rpl/t/rpl_log_pos.test	2012-01-19 16:56:43 +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-04 15:16:17 +0000
+++ b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test	2012-01-19 16:56:43 +0000
@@ -61,8 +61,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;

=== modified file 'mysql-test/suite/rpl/t/rpl_packet.test'
--- a/mysql-test/suite/rpl/t/rpl_packet.test	2012-01-04 15:16:17 +0000
+++ b/mysql-test/suite/rpl/t/rpl_packet.test	2012-01-19 16:56:43 +0000
@@ -126,8 +126,8 @@ connection slave;
 # 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.

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5 branch (nuno.carvalho:3692 to 3693) Bug#13050593Nuno Carvalho20 Jan