MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Luis Soares Date:September 26 2010 11:06pm
Subject:bzr commit into mysql-next-mr-bugfixing branch (luis.soares:3298) Bug#56912
View as plain text  
#At file:///home/lsoares/Workspace/bzr/work/bugfixing/56912/mysql-next-mr-bugfixing/ based on revid:mats.kindahl@stripped

 3298 Luis Soares	2010-09-27
      BUG#56912: binlog_killed fails sporadically on
                 mysql-next-mr-bugfixing codebase.
      Two new event types were added recently. This made the FD event
      to grow 2 bytes, thence the event positions in the binary log
      shifted two bytes as well. Given that sometimes the assertion in
      the binlog_killed test relies on absolute binary log positions,
      it will try to read events from a current obsolete position (175,
      while the new one is 177).
      We fix this by making the test to read the current position from
      SHOW MASTER STATUS into $start_pos and then issuing mysqlbinlog
      with --start-position=$start_pos instead of a hardcoded absolute
      position. This will also make the dump to read the BEGIN event
      that precedes the actual INSERT event (whereas before it would
      not), but this should not affect the assertion correctness.

=== modified file 'mysql-test/suite/binlog/t/binlog_killed.test'
--- a/mysql-test/suite/binlog/t/binlog_killed.test	2010-07-12 11:55:16 +0000
+++ b/mysql-test/suite/binlog/t/binlog_killed.test	2010-09-26 23:06:44 +0000
@@ -36,6 +36,7 @@ let $ID= `select connection_id()`;
 # `reset master' problem is to be addressed by bug#15580 fixes.
 reset master;
+let $start_pos= query_get_value("SHOW MASTER STATUS", Position, 1);
 send insert into t2 values (null, null), (null, get_lock("a", 10));
@@ -51,9 +52,8 @@ connection con2;
 let $rows= `select count(*) from t2  /* must be 2 or 0 */`;
 let $MYSQLD_DATADIR= `select @@datadir`;
---exec $MYSQL_BINLOG --force-if-open --start-position=175 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog
+--exec $MYSQL_BINLOG --force-if-open --start-position=$start_pos $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog
 eval select
@@ -67,6 +67,14 @@ enable_abort_on_error;
+if (`SELECT @result != 0`)
+  -- echo error_code:$error_code, insert:$insert_binlogged, rows:$rows
+  SELECT * FROM t2;
+  -- die
 select @result /* must be zero either way */;

Attachment: [text/bzr-bundle] bzr/
bzr commit into mysql-next-mr-bugfixing branch (luis.soares:3298) Bug#56912Luis Soares27 Sep