From: Date: August 22 2008 6:24am Subject: bzr push into mysql-5.1 branch (bar:2681 to 2682) Bug#31455 List-Archive: http://lists.mysql.com/commits/52279 X-Bug: 31455 Message-Id: <200808220424.m7M4OM0V016012@bar.myoffice.izhnet.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 2682 Alexander Barkov 2008-08-22 Additional fix for bug#31455 Removing server version with regex_replace to avoid non-determenistic test results. modified: mysql-test/include/mysqlbinlog_row_engine.inc mysql-test/r/mysqlbinlog_row.result mysql-test/r/mysqlbinlog_row_innodb.result mysql-test/r/mysqlbinlog_row_myisam.result mysql-test/r/mysqlbinlog_row_trans.result mysql-test/t/mysqlbinlog_row.test mysql-test/t/mysqlbinlog_row_trans.test 2681 Alexander Barkov 2008-08-21 Additional fix for bug#31455 (rpl decoder) - Implementing --base64-format=decode-rows, to display SQL-alike decoded row events without their BINLOG statements. - Adding --base64-format=decode-rows into tests when calling mysqlbinlog to avoid non-deterministic results - Removing resetting of last_table_id in "RESET MASTER", which appeared to be dangerous. modified: client/mysqlbinlog.cc mysql-test/include/mysqlbinlog_row_engine.inc mysql-test/r/mysqlbinlog_row.result mysql-test/r/mysqlbinlog_row_innodb.result mysql-test/r/mysqlbinlog_row_myisam.result mysql-test/r/mysqlbinlog_row_trans.result mysql-test/t/mysqlbinlog_row.test mysql-test/t/mysqlbinlog_row_big.test mysql-test/t/mysqlbinlog_row_trans.test sql/log_event.cc sql/log_event.h sql/mysql_priv.h sql/sql_base.cc sql/sql_repl.cc === modified file 'mysql-test/include/mysqlbinlog_row_engine.inc' --- a/mysql-test/include/mysqlbinlog_row_engine.inc 2008-08-21 11:47:23 +0000 +++ b/mysql-test/include/mysqlbinlog_row_engine.inc 2008-08-22 04:22:16 +0000 @@ -1650,7 +1650,7 @@ FLUSH LOGS; --echo # let $MYSQLD_DATADIR= `select @@datadir`; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ --exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLTEST_VARDIR/log/master-bin.000001 --echo # @@ -1730,7 +1730,7 @@ FLUSH LOGS; --echo # let $MYSQLD_DATADIR= `select @@datadir`; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ --exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLTEST_VARDIR/log/master-bin.000001 --echo # @@ -1853,7 +1853,7 @@ FLUSH LOGS; --echo # let $MYSQLD_DATADIR= `select @@datadir`; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ --exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLTEST_VARDIR/log/master-bin.000001 --echo # @@ -1911,7 +1911,7 @@ FLUSH LOGS; --echo # let $MYSQLD_DATADIR= `select @@datadir`; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ --exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLTEST_VARDIR/log/master-bin.000001 --echo # === modified file 'mysql-test/r/mysqlbinlog_row.result' --- a/mysql-test/r/mysqlbinlog_row.result 2008-08-21 11:47:23 +0000 +++ b/mysql-test/r/mysqlbinlog_row.result 2008-08-22 04:22:16 +0000 @@ -332,7 +332,7 @@ flush logs; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at # -#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v 5.1.28-debug-log created 010909 4:46:40 at startup +#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 === modified file 'mysql-test/r/mysqlbinlog_row_innodb.result' --- a/mysql-test/r/mysqlbinlog_row_innodb.result 2008-08-21 11:47:23 +0000 +++ b/mysql-test/r/mysqlbinlog_row_innodb.result 2008-08-22 04:22:16 +0000 @@ -2249,7 +2249,7 @@ FLUSH LOGS; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at # -#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v 5.1.28-debug-log created 010909 4:46:40 at startup +#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 @@ -3872,7 +3872,7 @@ FLUSH LOGS; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at # -#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v 5.1.28-debug-log created 010909 4:46:40 at startup +#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 @@ -4239,7 +4239,7 @@ FLUSH LOGS; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at # -#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v 5.1.28-debug-log created 010909 4:46:40 at startup +#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 @@ -4800,7 +4800,7 @@ FLUSH LOGS; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at # -#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v 5.1.28-debug-log created 010909 4:46:40 at startup +#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 === modified file 'mysql-test/r/mysqlbinlog_row_myisam.result' --- a/mysql-test/r/mysqlbinlog_row_myisam.result 2008-08-21 11:47:23 +0000 +++ b/mysql-test/r/mysqlbinlog_row_myisam.result 2008-08-22 04:22:16 +0000 @@ -2249,7 +2249,7 @@ FLUSH LOGS; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at # -#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v 5.1.28-debug-log created 010909 4:46:40 at startup +#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 @@ -3894,7 +3894,7 @@ FLUSH LOGS; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at # -#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v 5.1.28-debug-log created 010909 4:46:40 at startup +#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 @@ -4267,7 +4267,7 @@ FLUSH LOGS; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at # -#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v 5.1.28-debug-log created 010909 4:46:40 at startup +#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 @@ -4838,7 +4838,7 @@ FLUSH LOGS; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at # -#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v 5.1.28-debug-log created 010909 4:46:40 at startup +#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 === modified file 'mysql-test/r/mysqlbinlog_row_trans.result' --- a/mysql-test/r/mysqlbinlog_row_trans.result 2008-08-21 11:47:23 +0000 +++ b/mysql-test/r/mysqlbinlog_row_trans.result 2008-08-22 04:22:16 +0000 @@ -128,7 +128,7 @@ FLUSH LOGS; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at # -#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v 5.1.28-debug-log created 010909 4:46:40 at startup +#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 === modified file 'mysql-test/t/mysqlbinlog_row.test' --- a/mysql-test/t/mysqlbinlog_row.test 2008-08-21 11:47:23 +0000 +++ b/mysql-test/t/mysqlbinlog_row.test 2008-08-22 04:22:16 +0000 @@ -442,5 +442,5 @@ flush logs; let $MYSQLD_DATADIR= `select @@datadir`; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ --exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLTEST_VARDIR/log/master-bin.000001 === modified file 'mysql-test/t/mysqlbinlog_row_trans.test' --- a/mysql-test/t/mysqlbinlog_row_trans.test 2008-08-21 11:47:23 +0000 +++ b/mysql-test/t/mysqlbinlog_row_trans.test 2008-08-22 04:22:16 +0000 @@ -150,7 +150,7 @@ FLUSH LOGS; --echo # let $MYSQLD_DATADIR= `select @@datadir`; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ --exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLTEST_VARDIR/log/master-bin.000001 --echo #