List:Commits« Previous MessageNext Message »
From:Li-Bing.Song Date:April 13 2010 8:56am
Subject:bzr commit into mysql-5.1-bugteam branch (Li-Bing.Song:3449) Bug#49741
View as plain text  
#At file:///home/anders/work/bzrwork/worktree1/mysql-5.1-bugteam/ based on revid:omer@stripped

 3449 Li-Bing.Song@stripped	2010-04-13
      Bug #49741  test files contain explicit references to bin/relay-log positions
      
      Some of the test cases reference to binlog position and
      these position numbers are written into result explicitly.
      It is difficult to maintain if log event format changes. 
      
      After this patch, All the binlog position numbers which can be effected 
      by changing binlog format are removed from the result file.
     @ mysql-test/extra/binlog_tests/binlog.test
        It only cares whether current binlog file index is changed, so it is ok
        with 'show_master_status.inc' instead of 'show mater status'.
     @ mysql-test/include/get_relay_log_pos.inc
        According to the position of a log event in master binlog file,
        find the peer position of a log event in relay log file.
     @ mysql-test/include/show_slave_status3.inc
        Until_log_pos is masked in include file.
     @ mysql-test/r/flush_block_commit_notembedded.result
        It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'.
     @ mysql-test/r/multi_update.result
        It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'.
     @ mysql-test/suite/binlog/r/binlog_innodb.result
        It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'.
     @ mysql-test/suite/binlog/r/binlog_row_binlog.result
        Position in the result of 'show master status' is replaced by '#'.
     @ mysql-test/suite/binlog/r/binlog_stm_binlog.result
        Position in the result of 'show master status' is replaced by '#'.
     @ mysql-test/suite/binlog/t/binlog_innodb.test
        It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'.
     @ mysql-test/suite/bugs/r/rpl_bug36391.result
        Position in the result of 'show master status' is replaced by '#'.
     @ mysql-test/suite/bugs/t/rpl_bug36391.test
        'show master status' is replaced by 'show_master_status.inc'.
        Position in the result of 'show master status' is replaced by '#'.
     @ mysql-test/suite/engines/funcs/r/rpl_000015.result
        It checks whether somethings are binlogged, 
        so we using 'show_binlog_event.inc' instead of 'show master status'.
     @ mysql-test/suite/engines/funcs/t/rpl_log_pos.test
        Use 'query_get_value(SHOW MASTER STATUS, Position, 1)' to get the number of current binlog position, and use binlog position variables instead of explicit number in the 'CHANGE MASTER' statements.
        
        The numbers of 'master_log_pos' in result file  are replaced by '#'.
     @ mysql-test/suite/engines/funcs/t/rpl_row_until.test
        Use 'query_get_value(SHOW MASTER STATUS, Position, 1)' to get the number of current binlog position, and use binlog position variables instead of explicit number in the 'CHANGE MASTER' statements.
        
        The numbers of 'master_log_pos' in result file  are replaced by '#'.
     @ mysql-test/suite/rpl/t/rpl_dual_pos_advance.test
        Use 'query_get_value(SHOW MASTER STATUS, Position, 1)' to get the number of current binlog position, and use binlog position variables instead of explicit number in the 'CHANGE MASTER' statements.
        
        The numbers of 'master_log_pos' in result file  are replaced by '#'.
     @ mysql-test/suite/rpl/t/rpl_slave_skip.test
        Use 'query_get_value(SHOW MASTER STATUS, Position, 1)' to get the number of current binlog position, and use binlog position variables instead of explicit number in the 'CHANGE MASTER' statements.
        
        The numbers of 'master_log_pos' in result file  are replaced by '#'.
     @ mysql-test/suite/rpl/t/rpl_stm_until.test
        Use 'query_get_value(SHOW MASTER STATUS, Position, 1)' to get the number of current binlog position, and use binlog position variables instead of explicit number in the 'CHANGE MASTER' statements.
        
        The numbers of 'master_log_pos' in result file  are replaced by '#'.
     @ mysql-test/t/flush_block_commit_notembedded.test
        It checks whether somethings are binlogged, 
        so we using 'show_binlog_event.inc' instead of 'show master status'.
     @ mysql-test/t/multi_update.test
        It checks whether somethings are binlogged, 
        so we using 'show_binlog_event.inc' instead of 'show master status'.

    added:
      mysql-test/include/get_relay_log_pos.inc
      mysql-test/include/show_slave_status3.inc
    modified:
      mysql-test/extra/binlog_tests/binlog.test
      mysql-test/extra/rpl_tests/rpl_deadlock.test
      mysql-test/r/flush_block_commit_notembedded.result
      mysql-test/r/multi_update.result
      mysql-test/suite/binlog/r/binlog_innodb.result
      mysql-test/suite/binlog/r/binlog_row_binlog.result
      mysql-test/suite/binlog/r/binlog_stm_binlog.result
      mysql-test/suite/binlog/t/binlog_innodb.test
      mysql-test/suite/bugs/r/rpl_bug36391.result
      mysql-test/suite/bugs/t/rpl_bug36391.test
      mysql-test/suite/engines/funcs/r/rpl_000015.result
      mysql-test/suite/engines/funcs/r/rpl_log_pos.result
      mysql-test/suite/engines/funcs/r/rpl_row_until.result
      mysql-test/suite/engines/funcs/t/rpl_000015.test
      mysql-test/suite/engines/funcs/t/rpl_log_pos.test
      mysql-test/suite/engines/funcs/t/rpl_row_until.test
      mysql-test/suite/rpl/r/rpl_deadlock_innodb.result
      mysql-test/suite/rpl/r/rpl_dual_pos_advance.result
      mysql-test/suite/rpl/r/rpl_log_pos.result
      mysql-test/suite/rpl/r/rpl_slave_skip.result
      mysql-test/suite/rpl/r/rpl_stm_until.result
      mysql-test/suite/rpl/t/rpl_dual_pos_advance.test
      mysql-test/suite/rpl/t/rpl_log_pos.test
      mysql-test/suite/rpl/t/rpl_slave_skip.test
      mysql-test/suite/rpl/t/rpl_stm_until.test
      mysql-test/t/flush_block_commit_notembedded.test
      mysql-test/t/multi_update.test
=== modified file 'mysql-test/extra/binlog_tests/binlog.test'
--- a/mysql-test/extra/binlog_tests/binlog.test	2009-10-14 15:46:45 +0000
+++ b/mysql-test/extra/binlog_tests/binlog.test	2010-04-13 08:56:00 +0000
@@ -249,14 +249,15 @@ reset master;
 drop table if exists t3;
 --enable_warnings
 create table t3 (a int(11) NOT NULL AUTO_INCREMENT, b text, PRIMARY KEY (a) ) engine=innodb;
-show master status;
+source include/show_master_status.inc;
 let $it=4;
 while ($it)
 {
 insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!
 aaaaaaaaaaaaaaaaaaaaaaa');
 dec $it;
 }
-show master status /* must show new binlog index after rotating */;
+# must show new binlog index after rotating;
+source include/show_master_status.inc;
 drop table t3;
 
 --echo #

=== modified file 'mysql-test/extra/rpl_tests/rpl_deadlock.test'
--- a/mysql-test/extra/rpl_tests/rpl_deadlock.test	2009-04-03 21:33:13 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_deadlock.test	2010-04-13 08:56:00 +0000
@@ -103,6 +103,7 @@ SET global max_relay_log_size=0;
 --source include/stop_slave.inc
 DELETE FROM t2;
 # Set slave position to the BEGIN log event
+--replace_result $master_pos_begin MASTER_POS_BEGIN
 eval CHANGE MASTER TO MASTER_LOG_POS=$master_pos_begin; 
 BEGIN;
 # Hold lock

=== added file 'mysql-test/include/get_relay_log_pos.inc'
--- a/mysql-test/include/get_relay_log_pos.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/get_relay_log_pos.inc	2010-04-13 08:56:00 +0000
@@ -0,0 +1,51 @@
+# Get the relay log positon of a log event.
+
+# Usage: 
+# $relay_log_file: The log event is in which relay log 
+# $master_pos_log: The log event's position in master binlog file 
+
+#    let $relay_log_file= 'relay-log-bin.000001'; 
+#    let $master_log_pos= 106; 
+#    source include/get_relay_log_pos.inc;
+
+# The log event's position in relay log file is set into $relay_log_pos
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+let $tmp_file= $MYSQLTEST_VARDIR/tmp/mysqlbinlog.events;
+--exec $MYSQL_BINLOG $MYSQLD_DATADIR/$relay_log_file > $tmp_file
+
+# All queries in this file should not be logged.
+--disable_query_log
+
+--disable_warnings
+DROP TEMPORARY TABLE IF EXISTS mysqlbinlog_events;
+DROP TEMPORARY TABLE IF EXISTS events_at;
+DROP TEMPORARY TABLE IF EXISTS events_pos;
+CREATE TEMPORARY TABLE mysqlbinlog_events(c1 INT AUTO_INCREMENT KEY, c2 varchar(256));
+
+# Event postion is in the comments output by mysqlbinlog, we load this
+# comments into the table 
+# '# at 106' 
+# '# ....  end_log_pos 106'
+eval LOAD DATA LOCAL INFILE '$tmp_file' INTO TABLE mysqlbinlog_events
+  LINES STARTING BY '#' (c2) SET c1 = NULL;
+--enable_warnings
+
+# Event pos in relay log file is inserted into table events_at
+CREATE TEMPORARY TABLE events_at(c1 INT AUTO_INCREMENT KEY, c2 varchar(256))
+  SELECT c2 FROM mysqlbinlog_events WHERE c2 LIKE ' at%' ORDER BY c1;
+
+# Event pos in master log file is inserted into table events_pos
+CREATE TEMPORARY TABLE events_pos(c1 INT AUTO_INCREMENT KEY, c2 varchar(256))
+  SELECT c2 FROM mysqlbinlog_events WHERE c2 LIKE '% end_log_pos %' ORDER BY c1;
+
+# The relationship between master_log_pos and relay_log_pos is that
+# events_pos.c1 + 1 = events_at.c1. 
+#
+# There is a fault that we can't get the relay log position of the last event,
+# as it is not output by mysqlbinlog
+let $relay_log_pos= `SELECT SUBSTRING(a.c2, 5)
+  FROM events_at a, events_pos b
+  WHERE a.c1=b.c1+1 and b.c2 LIKE '% $master_log_pos%'`;
+DROP TEMPORARY TABLE mysqlbinlog_events, events_at, events_pos;
+--enable_query_log

=== added file 'mysql-test/include/show_slave_status3.inc'
--- a/mysql-test/include/show_slave_status3.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/show_slave_status3.inc	2010-04-13 08:56:00 +0000
@@ -0,0 +1,8 @@
+# Include file to show the slave status, masking out some information
+# that varies depending on where the test is executed.
+
+# masked out log positions
+
+--replace_result $MASTER_MYPORT MASTER_PORT
+--replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 26 # 33 # 35 # 36 #
+query_vertical SHOW SLAVE STATUS;

=== modified file 'mysql-test/r/flush_block_commit_notembedded.result'
--- a/mysql-test/r/flush_block_commit_notembedded.result	2009-03-06 14:56:17 +0000
+++ b/mysql-test/r/flush_block_commit_notembedded.result	2010-04-13 08:56:00 +0000
@@ -7,15 +7,13 @@ SET AUTOCOMMIT=0;
 INSERT t1 VALUES (1);
 # Switch to connection con2
 FLUSH TABLES WITH READ LOCK;
-SHOW MASTER STATUS;
-File	Position	Binlog_Do_DB	Binlog_Ignore_DB
-master-bin.000001	106		
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 # Switch to connection con1
 COMMIT;
 # Switch to connection con2
-SHOW MASTER STATUS;
-File	Position	Binlog_Do_DB	Binlog_Ignore_DB
-master-bin.000001	106		
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 UNLOCK TABLES;
 # Switch to connection con1
 DROP TABLE t1;

=== modified file 'mysql-test/r/multi_update.result'
--- a/mysql-test/r/multi_update.result	2010-02-10 14:37:34 +0000
+++ b/mysql-test/r/multi_update.result	2010-04-13 08:56:00 +0000
@@ -602,9 +602,9 @@ select * from t2 /* must be (3,1), (4,4)
 a	b
 3	1
 4	4
-show master status /* there must be the UPDATE query event */;
-File	Position	Binlog_Do_DB	Binlog_Ignore_DB
-master-bin.000001	206		
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; UPDATE t2,t1 SET t2.a=t1.a+2
 delete from t1;
 delete from t2;
 insert into t1 values (1,2),(3,4),(4,4);
@@ -612,9 +612,9 @@ insert into t2 values (1,2),(3,4),(4,4);
 reset master;
 UPDATE t2,t1  SET t2.a=t2.b where t2.a=t1.a;
 ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
-show master status /* there must be the UPDATE query event */;
-File	Position	Binlog_Do_DB	Binlog_Ignore_DB
-master-bin.000001	221		
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; UPDATE t2,t1  SET t2.a=t2.b where t2.a=t1.a
 drop table t1, t2;
 set @@session.binlog_format= @sav_binlog_format;
 drop table if exists t1, t2, t3;

=== modified file 'mysql-test/suite/binlog/r/binlog_innodb.result'
--- a/mysql-test/suite/binlog/r/binlog_innodb.result	2009-05-31 05:44:41 +0000
+++ b/mysql-test/suite/binlog/r/binlog_innodb.result	2010-04-13 08:56:00 +0000
@@ -156,9 +156,9 @@ select * from t2 /* must be (3,1), (4,4)
 a	b
 1	1
 4	4
-show master status /* there must no UPDATE in binlog */;
-File	Position	Binlog_Do_DB	Binlog_Ignore_DB
-master-bin.000001	106		
+# There must no UPDATE in binlog;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 delete from t1;
 delete from t2;
 insert into t1 values (1,2),(3,4),(4,4);
@@ -166,8 +166,8 @@ insert into t2 values (1,2),(3,4),(4,4);
 reset master;
 UPDATE t2,t1  SET t2.a=t2.b where t2.a=t1.a;
 ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
-show master status /* there must be no UPDATE query event */;
-File	Position	Binlog_Do_DB	Binlog_Ignore_DB
-master-bin.000001	106		
+# There must be no UPDATE query event;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 drop table t1, t2;
 End of tests

=== modified file 'mysql-test/suite/binlog/r/binlog_row_binlog.result'
--- a/mysql-test/suite/binlog/r/binlog_row_binlog.result	2009-10-14 15:46:45 +0000
+++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result	2010-04-13 08:56:00 +0000
@@ -1289,14 +1289,14 @@ drop table if exists t3;
 create table t3 (a int(11) NOT NULL AUTO_INCREMENT, b text, PRIMARY KEY (a) ) engine=innodb;
 show master status;
 File	Position	Binlog_Do_DB	Binlog_Ignore_DB
-master-bin.000001	346		
+master-bin.000001	#	<Binlog_Do_DB>	<Binlog_Ignore_DB>
 insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!
 aaaaaaaaaaaaaaaaaaaaaaa');
-show master status /* must show new binlog index after rotating */;
+show master status;
 File	Position	Binlog_Do_DB	Binlog_Ignore_DB
-master-bin.000002	106		
+master-bin.000002	#	<Binlog_Do_DB>	<Binlog_Ignore_DB>
 drop table t3;
 #
 # Bug #45998: database crashes when running "create as select"

=== modified file 'mysql-test/suite/binlog/r/binlog_stm_binlog.result'
--- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result	2009-10-14 15:46:45 +0000
+++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result	2010-04-13 08:56:00 +0000
@@ -764,14 +764,14 @@ drop table if exists t3;
 create table t3 (a int(11) NOT NULL AUTO_INCREMENT, b text, PRIMARY KEY (a) ) engine=innodb;
 show master status;
 File	Position	Binlog_Do_DB	Binlog_Ignore_DB
-master-bin.000001	346		
+master-bin.000001	#	<Binlog_Do_DB>	<Binlog_Ignore_DB>
 insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!
 aaaaaaaaaaaaaaaaaaaaaaa');
-show master status /* must show new binlog index after rotating */;
+show master status;
 File	Position	Binlog_Do_DB	Binlog_Ignore_DB
-master-bin.000002	106		
+master-bin.000002	#	<Binlog_Do_DB>	<Binlog_Ignore_DB>
 drop table t3;
 #
 # Bug #45998: database crashes when running "create as select"

=== modified file 'mysql-test/suite/binlog/t/binlog_innodb.test'
--- a/mysql-test/suite/binlog/t/binlog_innodb.test	2009-01-08 02:06:54 +0000
+++ b/mysql-test/suite/binlog/t/binlog_innodb.test	2010-04-13 08:56:00 +0000
@@ -155,7 +155,8 @@ reset master;
 UPDATE t2,t1 SET t2.a=t1.a+2;
 # check
 select * from t2 /* must be (3,1), (4,4) */;
-show master status /* there must no UPDATE in binlog */;
+--echo # There must no UPDATE in binlog;
+source include/show_binlog_events.inc;
 
 # B. testing multi_update::send_error() execution branch
 delete from t1;
@@ -165,7 +166,8 @@ insert into t2 values (1,2),(3,4),(4,4);
 reset master;
 --error ER_DUP_ENTRY
 UPDATE t2,t1  SET t2.a=t2.b where t2.a=t1.a;
-show master status /* there must be no UPDATE query event */;
+--echo # There must be no UPDATE query event;
+source include/show_binlog_events.inc;
 
 # cleanup bug#27716
 drop table t1, t2;

=== modified file 'mysql-test/suite/bugs/r/rpl_bug36391.result'
--- a/mysql-test/suite/bugs/r/rpl_bug36391.result	2009-01-27 20:49:37 +0000
+++ b/mysql-test/suite/bugs/r/rpl_bug36391.result	2010-04-13 08:56:00 +0000
@@ -13,5 +13,6 @@ Tables_in_test
 t1
 show master status;
 File	Position	Binlog_Do_DB	Binlog_Ignore_DB
-master-bin.000001	278		
+master-bin.000001	#	<Binlog_Do_DB>	<Binlog_Ignore_DB>
 flush logs;
+drop table t1;

=== modified file 'mysql-test/suite/bugs/t/rpl_bug36391.test'
--- a/mysql-test/suite/bugs/t/rpl_bug36391.test	2009-01-27 20:49:37 +0000
+++ b/mysql-test/suite/bugs/t/rpl_bug36391.test	2010-04-13 08:56:00 +0000
@@ -21,8 +21,10 @@ create table t1(id int);
 
 show tables;
 
-show master status;
+--source include/show_master_status.inc
 
 flush logs;
 
 --exec $MYSQL_BINLOG $MYSQL_TEST_DIR/var/log/master-bin.000001 | $MYSQL test
+
+drop table t1;

=== modified file 'mysql-test/suite/engines/funcs/r/rpl_000015.result'
--- a/mysql-test/suite/engines/funcs/r/rpl_000015.result	2010-03-18 06:42:07 +0000
+++ b/mysql-test/suite/engines/funcs/r/rpl_000015.result	2010-04-13 08:56:00 +0000
@@ -5,9 +5,8 @@ reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
 reset master;
-show master status;
-File	Position	Binlog_Do_DB	Binlog_Ignore_DB
-master-bin.000001	106		
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 stop slave;
 reset slave;
 show slave status;

=== modified file 'mysql-test/suite/engines/funcs/r/rpl_log_pos.result'
--- a/mysql-test/suite/engines/funcs/r/rpl_log_pos.result	2010-03-18 06:42:07 +0000
+++ b/mysql-test/suite/engines/funcs/r/rpl_log_pos.result	2010-04-13 08:56:00 +0000
@@ -4,39 +4,33 @@ reset master;
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
-show master status;
-File	Position	Binlog_Do_DB	Binlog_Ignore_DB
-master-bin.000001	106	<Binlog_Ignore_DB>	
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert	Last_IO_Errno	Last_IO_Error	Last_SQL_Errno	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	106	#	#	master-bin.000001	Yes	Yes							0		0	106	#	None		0	No						#	No	0		0	
+#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	MASTER_LOG_POS	#	#	master-bin.000001	Yes	Yes							0		0	MASTER_LOG_POS	#	None		0	No						#	No	0		0	
 stop slave;
-change master to master_log_pos=106;
+change master to master_log_pos=MASTER_LOG_POS;
 start slave;
 stop slave;
-change master to master_log_pos=106;
+change master to master_log_pos=MASTER_LOG_POS;
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert	Last_IO_Errno	Last_IO_Error	Last_SQL_Errno	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	106	#	#	master-bin.000001	No	No							0		0	106	#	None		0	No						#	No	0		0	
+#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	MASTER_LOG_POS	#	#	master-bin.000001	No	No							0		0	MASTER_LOG_POS	#	None		0	No						#	No	0		0	
 start slave;
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert	Last_IO_Errno	Last_IO_Error	Last_SQL_Errno	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	106	#	#	master-bin.000001	Yes	Yes							0		0	106	#	None		0	No						#	No	0		0	
+#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	MASTER_LOG_POS	#	#	master-bin.000001	Yes	Yes							0		0	MASTER_LOG_POS	#	None		0	No						#	No	0		0	
 stop slave;
 change master to master_log_pos=177;
 start slave;
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert	Last_IO_Errno	Last_IO_Error	Last_SQL_Errno	Last_SQL_Error
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	177	#	#	master-bin.000001	No	Yes							0		0	177	#	None		0	No						#	No	1236	Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position'	0	
-show master status;
-File	Position	Binlog_Do_DB	Binlog_Ignore_DB
-master-bin.000001	106	<Binlog_Ignore_DB>	
+#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	MASTER_LOG_POS	#	#	master-bin.000001	No	Yes							0		0	MASTER_LOG_POS	#	None		0	No						#	No	1236	Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position'	0	
 create table if not exists t1 (n int);
 drop table if exists t1;
 create table t1 (n int);
 insert into t1 values (1),(2),(3);
 stop slave;
-change master to master_log_pos=206;
+change master to master_log_pos=MASTER_LOG_POS;
 start slave;
 select * from t1 ORDER BY n;
 n

=== modified file 'mysql-test/suite/engines/funcs/r/rpl_row_until.result'
--- a/mysql-test/suite/engines/funcs/r/rpl_row_until.result	2010-03-18 06:42:07 +0000
+++ b/mysql-test/suite/engines/funcs/r/rpl_row_until.result	2010-04-13 08:56:00 +0000
@@ -12,7 +12,7 @@ create table t2(n int not null auto_incr
 insert into t2 values (1),(2);
 insert into t2 values (3),(4);
 drop table t2;
-start slave until master_log_file='master-bin.000001', master_log_pos=311;
+start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS;
 select * from t1;
 n
 1
@@ -45,7 +45,7 @@ Exec_Master_Log_Pos	#
 Relay_Log_Space	#
 Until_Condition	Master
 Until_Log_File	master-bin.000001
-Until_Log_Pos	311
+Until_Log_Pos	#
 Master_SSL_Allowed	No
 Master_SSL_CA_File	
 Master_SSL_CA_Path	
@@ -90,7 +90,7 @@ Exec_Master_Log_Pos	#
 Relay_Log_Space	#
 Until_Condition	Master
 Until_Log_File	master-no-such-bin.000001
-Until_Log_Pos	291
+Until_Log_Pos	#
 Master_SSL_Allowed	No
 Master_SSL_CA_File	
 Master_SSL_CA_Path	
@@ -103,8 +103,10 @@ Last_IO_Errno	0
 Last_IO_Error	
 Last_SQL_Errno	0
 Last_SQL_Error	
-start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
+start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=1014;
 select * from t2;
+n	1
+n	2
 show slave status;
 Slave_IO_State	#
 Master_Host	127.0.0.1
@@ -131,7 +133,7 @@ Exec_Master_Log_Pos	#
 Relay_Log_Space	#
 Until_Condition	Relay
 Until_Log_File	slave-relay-bin.000004
-Until_Log_Pos	728
+Until_Log_Pos	#
 Master_SSL_Allowed	No
 Master_SSL_CA_File	
 Master_SSL_CA_Path	
@@ -146,16 +148,16 @@ Last_SQL_Errno	0
 Last_SQL_Error	
 start slave;
 stop slave;
-start slave until master_log_file='master-bin.000001', master_log_pos=740;
-show slave status;
+start slave until master_log_file='master-bin.000001', master_log_pos=868;
+SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
 Master_User	root
-Master_Port	MASTER_MYPORT
+Master_Port	MASTER_PORT
 Connect_Retry	1
 Master_Log_File	master-bin.000001
 Read_Master_Log_Pos	#
-Relay_Log_File	slave-relay-bin.000004
+Relay_Log_File	#
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
 Slave_IO_Running	Yes
@@ -163,7 +165,7 @@ Slave_SQL_Running	No
 Replicate_Do_DB	
 Replicate_Ignore_DB	
 Replicate_Do_Table	
-Replicate_Ignore_Table	
+Replicate_Ignore_Table	#
 Replicate_Wild_Do_Table	
 Replicate_Wild_Ignore_Table	
 Last_Errno	0
@@ -173,7 +175,7 @@ Exec_Master_Log_Pos	#
 Relay_Log_Space	#
 Until_Condition	Master
 Until_Log_File	master-bin.000001
-Until_Log_Pos	740
+Until_Log_Pos	#
 Master_SSL_Allowed	No
 Master_SSL_CA_File	
 Master_SSL_CA_Path	
@@ -182,8 +184,8 @@ Master_SSL_Cipher	
 Master_SSL_Key	
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	0
-Last_IO_Error	
+Last_IO_Errno	#
+Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
 start slave until master_log_file='master-bin', master_log_pos=561;

=== modified file 'mysql-test/suite/engines/funcs/t/rpl_000015.test'
--- a/mysql-test/suite/engines/funcs/t/rpl_000015.test	2010-03-18 06:42:07 +0000
+++ b/mysql-test/suite/engines/funcs/t/rpl_000015.test	2010-04-13 08:56:00 +0000
@@ -6,7 +6,7 @@
 source include/master-slave.inc;
 
 reset master;
-show master status;
+source include/show_binlog_events.inc;
 save_master_pos;
 connection slave;
 stop slave;

=== modified file 'mysql-test/suite/engines/funcs/t/rpl_log_pos.test'
--- a/mysql-test/suite/engines/funcs/t/rpl_log_pos.test	2010-03-18 06:42:07 +0000
+++ b/mysql-test/suite/engines/funcs/t/rpl_log_pos.test	2010-04-13 08:56:00 +0000
@@ -11,36 +11,40 @@
 # Passes with rbr no problem, removed statement include [jbm]
 
 source include/master-slave.inc;
---replace_column 3 <Binlog_Ignore_DB>
-show master status;
+let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
 sync_slave_with_master;
---replace_result $MASTER_MYPORT MASTER_PORT
+--replace_result $master_log_pos MASTER_LOG_POS $MASTER_MYPORT MASTER_PORT
 --replace_column 1 # 8 # 9 # 23 # 33 #
 show slave status;
 stop slave;
-change master to master_log_pos=106;
+
+--replace_result $master_log_pos MASTER_LOG_POS
+eval change master to master_log_pos=$master_log_pos;
 start slave;
 sleep 5;
 stop slave;
-change master to master_log_pos=106;
---replace_result $MASTER_MYPORT MASTER_PORT
+
+--replace_result $master_log_pos MASTER_LOG_POS
+eval change master to master_log_pos=$master_log_pos;
+--replace_result $master_log_pos MASTER_LOG_POS $MASTER_MYPORT MASTER_PORT
 --replace_column 1 # 8 # 9 # 23 # 33 #
 show slave status;
 start slave;
 sleep 5;
---replace_result $MASTER_MYPORT MASTER_PORT
+--replace_result $master_log_pos MASTER_LOG_POS $MASTER_MYPORT MASTER_PORT
 --replace_column 1 # 8 # 9 # 23 # 33 #
 show slave status;
 stop slave;
+--echo # impossible position leads to an error
 change master to master_log_pos=177;
 start slave;
 sleep 2;
---replace_result $MASTER_MYPORT MASTER_PORT
+--replace_result 177 MASTER_LOG_POS $MASTER_MYPORT MASTER_PORT
 --replace_column 1 # 8 # 9 # 23 # 33 #
 show slave status;
 connection master;
---replace_column 3 <Binlog_Ignore_DB>
-show master status;
+
+let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
 create table if not exists t1 (n int);
 drop table if exists t1;
 create table t1 (n int);
@@ -48,7 +52,9 @@ insert into t1 values (1),(2),(3);
 save_master_pos;
 connection slave;
 stop slave;
-change master to master_log_pos=206;
+
+--replace_result $master_log_pos MASTER_LOG_POS
+eval change master to master_log_pos=$master_log_pos;
 start slave;
 sync_with_master;
 select * from t1 ORDER BY n;

=== modified file 'mysql-test/suite/engines/funcs/t/rpl_row_until.test'
--- a/mysql-test/suite/engines/funcs/t/rpl_row_until.test	2010-03-18 06:42:07 +0000
+++ b/mysql-test/suite/engines/funcs/t/rpl_row_until.test	2010-04-13 08:56:00 +0000
@@ -18,22 +18,26 @@ connection master;
 # create some events on master
 create table t1(n int not null auto_increment primary key);
 insert into t1 values (1),(2),(3),(4);
+let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1);
 drop table t1;
+
 create table t2(n int not null auto_increment primary key);
 insert into t2 values (1),(2);
+let $master_log_pos_2= query_get_value(SHOW MASTER STATUS, Position, 1);
 insert into t2 values (3),(4);
 drop table t2;
 
 # try to replicate all queries until drop of t1
 connection slave;
-start slave until master_log_file='master-bin.000001', master_log_pos=311;
+--replace_result $master_log_pos_1 MASTER_LOG_POS
+eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_log_pos_1;
 sleep 2;
 wait_for_slave_to_stop;
 # here table should be still not deleted
 select * from t1;
 --vertical_results
 --replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
+--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 26 # 33 #
 show slave status;
 
 # this should fail right after start
@@ -44,17 +48,21 @@ sleep 2;
 wait_for_slave_to_stop;
 --vertical_results
 --replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
+--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 26 # 33 #
 show slave status;
 
 # try replicate all up to and not including the second insert to t2;
-start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
+let $master_log_pos= $master_log_pos_2;
+let $relay_log_file= slave-relay-bin.000004;
+--source include/get_relay_log_pos.inc
+#--replace_result $relay_log_pos RELAY_LOG_POS
+eval start slave until relay_log_file='$relay_log_file', relay_log_pos=$relay_log_pos;
 sleep 2;
 wait_for_slave_to_stop;
 select * from t2;
 --vertical_results
 --replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
+--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 26 # 33 #
 show slave status;
 
 # clean up
@@ -66,14 +74,15 @@ sync_with_master;
 stop slave;
 
 # this should stop immediately as we are already there
-start slave until master_log_file='master-bin.000001', master_log_pos=740;
+eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_log_pos_2;
 sleep 2;
 wait_for_slave_to_stop;
 # here the sql slave thread should be stopped
---vertical_results
---replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
---replace_column 1 # 7 # 9 # 22 # 23 # 33 #
-show slave status;
+#--vertical_results
+#--replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
+#--replace_column 1 # 7 # 9 # 22 # 23 # 33 #
+#show slave status;
+source include/show_slave_status3.inc;
 
 #testing various error conditions
 --error 1277

=== modified file 'mysql-test/suite/rpl/r/rpl_deadlock_innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result	2009-04-03 21:33:13 +0000
+++ b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result	2010-04-13 08:56:00 +0000
@@ -157,7 +157,7 @@ SET @my_max_relay_log_size= @@global.max
 SET global max_relay_log_size=0;
 include/stop_slave.inc
 DELETE FROM t2;
-CHANGE MASTER TO MASTER_LOG_POS=440;
+CHANGE MASTER TO MASTER_LOG_POS=MASTER_POS_BEGIN;
 BEGIN;
 SELECT * FROM t1 FOR UPDATE;
 a

=== modified file 'mysql-test/suite/rpl/r/rpl_dual_pos_advance.result'
--- a/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result	2008-03-14 13:54:17 +0000
+++ b/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result	2010-04-13 08:56:00 +0000
@@ -22,20 +22,20 @@ insert into t3 values(2);
 insert into t3 values(3);
 commit;
 insert into t3 values(4);
-start slave until master_log_file="slave-bin.000001",master_log_pos=195;
+start slave until master_log_file="slave-bin.000001",master_log_pos=MASTER_LOG_POS;
 Warnings:
 Note	1278	It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
 show tables;
 Tables_in_test
 t1
 t2
-start slave until master_log_file="slave-bin.000001",master_log_pos=438;
+start slave until master_log_file="slave-bin.000001",master_log_pos=MASTER_LOG_POS;
 Warnings:
 Note	1278	It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
 select * from t3;
 n
 1
-start slave until master_log_file="slave-bin.000001",master_log_pos=663;
+start slave until master_log_file="slave-bin.000001",master_log_pos=MASTER_LOG_POS;
 Warnings:
 Note	1278	It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
 select * from t3;

=== modified file 'mysql-test/suite/rpl/r/rpl_log_pos.result'
--- a/mysql-test/suite/rpl/r/rpl_log_pos.result	2009-09-24 13:19:06 +0000
+++ b/mysql-test/suite/rpl/r/rpl_log_pos.result	2010-04-13 08:56:00 +0000
@@ -9,7 +9,7 @@ show master status;
 File	Position	Binlog_Do_DB	Binlog_Ignore_DB
 master-bin.000001	#	<Binlog_Do_DB>	<Binlog_Ignore_DB>
 include/stop_slave.inc
-change master to master_log_pos=75;
+change master to master_log_pos=MASTER_LOG_POS;
 SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
@@ -97,7 +97,7 @@ create table if not exists t1 (n int);
 drop table if exists t1;
 create table t1 (n int);
 insert into t1 values (1),(2),(3);
-change master to master_log_pos=4;
+change master to master_log_pos=MASTER_LOG_POS;
 start slave;
 select * from t1 ORDER BY n;
 n

=== modified file 'mysql-test/suite/rpl/r/rpl_slave_skip.result'
--- a/mysql-test/suite/rpl/r/rpl_slave_skip.result	2009-05-31 05:44:41 +0000
+++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result	2010-04-13 08:56:00 +0000
@@ -42,7 +42,7 @@ c	d
 2	8
 3	18
 **** On Slave ****
-START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=762;
+START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS;
 SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
@@ -104,7 +104,7 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	User var	#	#	@`foo`=12
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES(@foo, 2*@foo)
-START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=106;
+START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS;
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
 START SLAVE;
 SHOW SLAVE STATUS;

=== modified file 'mysql-test/suite/rpl/r/rpl_stm_until.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_until.result	2010-01-27 17:27:49 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_until.result	2010-04-13 08:56:00 +0000
@@ -17,7 +17,7 @@ insert into t2 values (3),(4);
 drop table t2;
 ==== Replicate one event at a time on slave ====
 [on slave]
-start slave until master_log_file='master-bin.000001', master_log_pos=323;
+start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS;
 select * from t1;
 n
 1
@@ -50,7 +50,7 @@ Exec_Master_Log_Pos	#
 Relay_Log_Space	#
 Until_Condition	Master
 Until_Log_File	master-bin.000001
-Until_Log_Pos	323
+Until_Log_Pos	#
 Master_SSL_Allowed	No
 Master_SSL_CA_File	
 Master_SSL_CA_Path	
@@ -96,7 +96,7 @@ Exec_Master_Log_Pos	#
 Relay_Log_Space	#
 Until_Condition	Master
 Until_Log_File	master-no-such-bin.000001
-Until_Log_Pos	291
+Until_Log_Pos	#
 Master_SSL_Allowed	No
 Master_SSL_CA_File	
 Master_SSL_CA_Path	
@@ -109,7 +109,7 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
-start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746;
+start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=RELAY_LOG_POS;
 select * from t2;
 n
 1
@@ -140,7 +140,7 @@ Exec_Master_Log_Pos	#
 Relay_Log_Space	#
 Until_Condition	Relay
 Until_Log_File	slave-relay-bin.000004
-Until_Log_Pos	746
+Until_Log_Pos	#
 Master_SSL_Allowed	No
 Master_SSL_CA_File	
 Master_SSL_CA_Path	
@@ -157,7 +157,7 @@ start slave;
 [on master]
 [on slave]
 include/stop_slave.inc
-start slave until master_log_file='master-bin.000001', master_log_pos=776;
+start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS;
 SHOW SLAVE STATUS;
 Slave_IO_State	#
 Master_Host	127.0.0.1
@@ -184,7 +184,7 @@ Exec_Master_Log_Pos	#
 Relay_Log_Space	#
 Until_Condition	Master
 Until_Log_File	master-bin.000001
-Until_Log_Pos	776
+Until_Log_Pos	#
 Master_SSL_Allowed	No
 Master_SSL_CA_File	
 Master_SSL_CA_Path	

=== modified file 'mysql-test/suite/rpl/t/rpl_dual_pos_advance.test'
--- a/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test	2009-01-09 14:12:31 +0000
+++ b/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test	2010-04-13 08:56:00 +0000
@@ -40,6 +40,8 @@ sync_with_master;
 stop slave;
 
 create table t2 (n int); # create one ignored event
+let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1);
+let $master_log_pos_1= `SELECT $master_log_pos_1 + 5`;
 
 save_master_pos;
 connection slave;
@@ -52,8 +54,12 @@ show tables;
 save_master_pos;
 
 create table t3 (n int) engine=innodb;
+let $master_log_pos_2= query_get_value(SHOW MASTER STATUS, Position, 1);
+let $master_log_pos_2= `SELECT $master_log_pos_2 + 5`;
 set @a=1;
 insert into t3 values(@a);
+let $master_log_pos_3= query_get_value(SHOW MASTER STATUS, Position, 1);
+let $master_log_pos_3= `SELECT $master_log_pos_3 + 5`;
 begin;
 insert into t3 values(2);
 insert into t3 values(3);
@@ -66,7 +72,8 @@ connection master;
 # bug is that START SLAVE UNTIL may stop too late, we test that by
 # asking it to stop before creation of t3.
 
-start slave until master_log_file="slave-bin.000001",master_log_pos=195;
+--replace_result $master_log_pos_1 MASTER_LOG_POS
+eval start slave until master_log_file="slave-bin.000001",master_log_pos=$master_log_pos_1;
 --source include/wait_for_slave_sql_to_stop.inc
 
 # then BUG#13861 causes t3 to show up below (because stopped too
@@ -75,12 +82,14 @@ start slave until master_log_file="slave
 show tables;
 
 # ensure that we do not break set @a=1; insert into t3 values(@a);
-start slave until master_log_file="slave-bin.000001",master_log_pos=438;
+--replace_result $master_log_pos_2 MASTER_LOG_POS
+eval start slave until master_log_file="slave-bin.000001",master_log_pos=$master_log_pos_2;
 --source include/wait_for_slave_sql_to_stop.inc
 select * from t3;
 
 # ensure that we do not break transaction
-start slave until master_log_file="slave-bin.000001",master_log_pos=663;
+--replace_result $master_log_pos_3 MASTER_LOG_POS
+eval start slave until master_log_file="slave-bin.000001",master_log_pos=$master_log_pos_3;
 --source include/wait_for_slave_sql_to_stop.inc
 select * from t3;
 

=== modified file 'mysql-test/suite/rpl/t/rpl_log_pos.test'
--- a/mysql-test/suite/rpl/t/rpl_log_pos.test	2009-09-24 13:19:06 +0000
+++ b/mysql-test/suite/rpl/t/rpl_log_pos.test	2010-04-13 08:56:00 +0000
@@ -16,6 +16,7 @@ source include/show_master_status.inc;
 sync_slave_with_master;
 source include/stop_slave.inc;
 
+--replace_result 75 MASTER_LOG_POS
 change master to master_log_pos=75;
 source include/show_slave_status2.inc;
 start slave;
@@ -32,6 +33,7 @@ create table t1 (n int);
 insert into t1 values (1),(2),(3);
 save_master_pos;
 connection slave;
+--replace_result 4 MASTER_LOG_POS
 change master to master_log_pos=4;
 start slave;
 sync_with_master;

=== modified file 'mysql-test/suite/rpl/t/rpl_slave_skip.test'
--- a/mysql-test/suite/rpl/t/rpl_slave_skip.test	2010-03-01 12:33:15 +0000
+++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test	2010-04-13 08:56:00 +0000
@@ -14,6 +14,7 @@ CREATE TABLE t1 (a INT, b INT);
 CREATE TABLE t2 (c INT, d INT);
 INSERT INTO t1 VALUES (1,1),(2,4),(3,9);
 INSERT INTO t2 VALUES (1,1),(2,8),(3,27);
+let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
 UPDATE t1,t2 SET b = d, d = b * 2 WHERE a = c;
 source include/show_binlog_events.inc;
 
@@ -21,12 +22,12 @@ source include/show_binlog_events.inc;
 SELECT * FROM t1;
 SELECT * FROM t2;
 save_master_pos;
-
 --echo **** On Slave ****
 connection slave;
 
 # Stop when reaching the the first table map event.
-START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=762;
+--replace_result $master_log_pos MASTER_LOG_POS
+eval START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=$master_log_pos;
 source include/wait_for_slave_sql_to_stop.inc;
 --replace_result $MASTER_MYPORT MASTER_PORT
 --replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 #
@@ -53,12 +54,14 @@ RESET MASTER;
 
 SET SESSION BINLOG_FORMAT=STATEMENT;
 SET @foo = 12;
+let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
 INSERT INTO t1 VALUES(@foo, 2*@foo);
 save_master_pos;
 source include/show_binlog_events.inc;
 
 connection slave;
-START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=106;
+--replace_result $master_log_pos MASTER_LOG_POS
+eval START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=$master_log_pos;
 source include/wait_for_slave_sql_to_stop.inc;
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
 START SLAVE;

=== modified file 'mysql-test/suite/rpl/t/rpl_stm_until.test'
--- a/mysql-test/suite/rpl/t/rpl_stm_until.test	2010-01-27 17:27:49 +0000
+++ b/mysql-test/suite/rpl/t/rpl_stm_until.test	2010-04-13 08:56:00 +0000
@@ -34,9 +34,11 @@ sync_slave_with_master;
 connection master;
 create table t1(n int not null auto_increment primary key);
 insert into t1 values (1),(2),(3),(4);
+let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1);
 drop table t1;
 create table t2(n int not null auto_increment primary key);
 insert into t2 values (1),(2);
+let $master_log_pos_2= query_get_value(SHOW MASTER STATUS, Position, 1);
 insert into t2 values (3),(4);
 drop table t2;
 
@@ -45,12 +47,13 @@ drop table t2;
 # try to replicate all queries until drop of t1
 --echo [on slave]
 connection slave;
-start slave until master_log_file='master-bin.000001', master_log_pos=323;
+--replace_result $master_log_pos_1 MASTER_LOG_POS
+eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_log_pos_1;
 --source include/wait_for_slave_io_to_start.inc
 --source include/wait_for_slave_sql_to_stop.inc
 # here table should be still not deleted
 select * from t1;
-source include/show_slave_status2.inc;
+source include/show_slave_status3.inc;
 
 # this should fail right after start
 start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
@@ -58,14 +61,18 @@ start slave until master_log_file='maste
 --source include/wait_for_slave_sql_to_stop.inc
 # again this table should be still not deleted
 select * from t1;
-source include/show_slave_status2.inc;
+source include/show_slave_status3.inc;
 
+let $relay_log_file= slave-relay-bin.000004;
+let $master_log_pos= $master_log_pos_2;
+source include/get_relay_log_pos.inc;
 # try replicate all up to and not including the second insert to t2;
-start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746;
+--replace_result $relay_log_pos RELAY_LOG_POS
+eval start slave until relay_log_file='$relay_log_file', relay_log_pos=$relay_log_pos;
 --source include/wait_for_slave_io_to_start.inc
 --source include/wait_for_slave_sql_to_stop.inc
 select * from t2;
-source include/show_slave_status2.inc;
+source include/show_slave_status3.inc;
 
 # clean up
 start slave;
@@ -76,11 +83,12 @@ sync_slave_with_master;
 --source include/stop_slave.inc
 
 # this should stop immediately as we are already there
-start slave until master_log_file='master-bin.000001', master_log_pos=776;
+--replace_result $master_log_pos_2 MASTER_LOG_POS
+eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_log_pos_2;
 --source include/wait_for_slave_io_to_start.inc
 --source include/wait_for_slave_sql_to_stop.inc
 --replace_result bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
-source include/show_slave_status2.inc;
+source include/show_slave_status3.inc;
 
 --echo ==== Test various error conditions ====
 

=== modified file 'mysql-test/t/flush_block_commit_notembedded.test'
--- a/mysql-test/t/flush_block_commit_notembedded.test	2009-03-06 14:56:17 +0000
+++ b/mysql-test/t/flush_block_commit_notembedded.test	2010-04-13 08:56:00 +0000
@@ -28,14 +28,14 @@ INSERT t1 VALUES (1);
 --echo # Switch to connection con2
 connection con2;
 FLUSH TABLES WITH READ LOCK;
-SHOW MASTER STATUS;
+--source include/show_binlog_events.inc
 --echo # Switch to connection con1
 connection con1;
 send COMMIT;
 --echo # Switch to connection con2
 connection con2;
 sleep 1;
-SHOW MASTER STATUS;
+--source include/show_binlog_events.inc
 UNLOCK TABLES;
 --echo # Switch to connection con1
 connection con1;

=== modified file 'mysql-test/t/multi_update.test'
--- a/mysql-test/t/multi_update.test	2010-02-10 14:37:34 +0000
+++ b/mysql-test/t/multi_update.test	2010-04-13 08:56:00 +0000
@@ -585,7 +585,7 @@ reset master;
 UPDATE t2,t1 SET t2.a=t1.a+2;
 # check
 select * from t2 /* must be (3,1), (4,4) */;
-show master status /* there must be the UPDATE query event */;
+source include/show_binlog_events.inc;
 
 # B. testing multi_update::send_error() ineffective update
 # (as there is a policy described at mysql_update() still go to binlog)
@@ -596,7 +596,7 @@ insert into t2 values (1,2),(3,4),(4,4);
 reset master;
 --error ER_DUP_ENTRY
 UPDATE t2,t1  SET t2.a=t2.b where t2.a=t1.a;
-show master status /* there must be the UPDATE query event */;
+source include/show_binlog_events.inc;
 
 # cleanup
 drop table t1, t2;


Attachment: [text/bzr-bundle] bzr/li-bing.song@sun.com-20100413085600-qoa3lq13zhsrcwn1.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (Li-Bing.Song:3449) Bug#49741Li-Bing.Song13 Apr
  • Re: bzr commit into mysql-5.1-bugteam branch (Li-Bing.Song:3449)Bug#49741Luís Soares19 Apr
    • Re: bzr commit into mysql-5.1-bugteam branch (Li-Bing.Song:3449)Bug#49741Libing Song29 Apr