List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:February 24 2009 5:26pm
Subject:bzr commit into mysql-6.0-bugteam branch (aelkin:3076) Bug#37313
View as plain text  
#At file:///home/andrei/MySQL/BZR/FIXES/6.0-bt-training/ based on revid:holyfoot@stripped

 3076 Andrei Elkin	2009-02-24 [merge]
      merging bug#37313fixes from 5.0-bt -> 5.1-bt -> 6.0-bt
modified:
  mysql-test/r/mysqlbinlog.result
  mysql-test/t/mysqlbinlog.test
  sql/log_event.cc

=== modified file 'mysql-test/r/mysqlbinlog.result'
--- a/mysql-test/r/mysqlbinlog.result	2009-02-23 15:36:44 +0000
+++ b/mysql-test/r/mysqlbinlog.result	2009-02-24 17:25:30 +0000
@@ -411,17 +411,6 @@ drop table t1;
 1
 drop table t1;
 shell> mysqlbinlog std_data/corrupt-relay-bin.000624 > var/tmp/bug31793.sql
-set @@global.server_id= 4294967295;
-reset master;
-select
-(@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog"))
-is not null;
-(@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog"))
-is not null
-1
-*** Unsigned server_id 4294967295 is found: 1 ***
-set @@global.server_id= 1;
-End of 5.0 tests
 flush logs;
 BUG#31611: Security risk with BINLOG statement
 SET BINLOG_FORMAT=ROW;
@@ -471,4 +460,15 @@ an_int	1000
 a_decimal	907.79
 a_string	Just a test
 DROP TABLE t1;
+set @@global.server_id= 4294967295;
+reset master;
+flush logs;
+select
+(@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog"))
+is not null;
+(@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog"))
+is not null
+1
+*** Unsigned server_id 4294967295 is found: 1 ***
+set @@global.server_id= 1;
 End of 5.1 tests

=== modified file 'mysql-test/t/mysqlbinlog.test'
--- a/mysql-test/t/mysqlbinlog.test	2009-02-23 15:36:44 +0000
+++ b/mysql-test/t/mysqlbinlog.test	2009-02-24 17:25:30 +0000
@@ -278,27 +278,6 @@ echo shell> mysqlbinlog std_data/corrupt
 error 1;
 exec $MYSQL_BINLOG $MYSQL_TEST_DIR/std_data/corrupt-relay-bin.000624 > $MYSQLTEST_VARDIR/tmp/bug31793.sql;
 
-#
-# Bug #37313  	BINLOG Contains Incorrect server id
-#
-
-let $save_server_id= `select @@global.server_id`;
-let $s_id_max=`select (1 << 32) - 1`;
-eval set @@global.server_id= $s_id_max;
-
-reset master;
---exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
-eval select
-(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog"))
-is not null;
-let $s_id_unsigned= `select @a like "%server id $s_id_max%" /* must return 1 */`;
-echo *** Unsigned server_id $s_id_max is found: $s_id_unsigned ***;
-
-eval set @@global.server_id= $save_server_id;
---remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog
-
---echo End of 5.0 tests
 
 #
 # Test --disable-force-if-open and --force-if-open
@@ -363,4 +342,25 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug325
 query_vertical SELECT * FROM t1;
 DROP TABLE t1;
 
+#
+# Bug #37313  	BINLOG Contains Incorrect server id
+#
+
+let $save_server_id= `select @@global.server_id`;
+let $s_id_max=`select (1 << 32) - 1`;
+eval set @@global.server_id= $s_id_max;
+
+reset master;
+flush logs;
+--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval select
+(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog"))
+is not null;
+let $s_id_unsigned= `select @a like "%server id $s_id_max%" /* must return 1 */`;
+echo *** Unsigned server_id $s_id_max is found: $s_id_unsigned ***;
+
+eval set @@global.server_id= $save_server_id;
+--remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog
+
 --echo End of 5.1 tests

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2009-02-23 15:36:44 +0000
+++ b/sql/log_event.cc	2009-02-24 17:25:30 +0000
@@ -1259,7 +1259,7 @@ void Log_event::print_header(IO_CACHE* f
 
   my_b_printf(file, "#");
   print_timestamp(file);
-  my_b_printf(file, " server id %lu  end_log_pos %s ", server_id,
+  my_b_printf(file, " server id %lu  end_log_pos %s ", (ulong) server_id,
               llstr(log_pos,llbuff));
 
   /* mysqlbinlog --hexdump */

Thread
bzr commit into mysql-6.0-bugteam branch (aelkin:3076) Bug#37313Andrei Elkin24 Feb