Bug #38127 main.mysqlbinlog_base64 fails sporadically on pushbuild
Submitted: 15 Jul 2008 10:05 Modified: 30 Jan 2009 17:18
Reporter: Sven Sandberg Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Replication Severity:S7 (Test Cases)
Version:5.1 OS:Any
Assigned to: Sven Sandberg CPU Architecture:Any
Tags: 51rpl, mysqlbinlog_base64, pushbuild, sporadic, test failure

[15 Jul 2008 10:05] Sven Sandberg
Description:
main.mysqlbinlog_base64                  [ fail ]

CURRENT_TEST: main.mysqlbinlog_base64
--- /data0/pushbuild/pb2-2/pb/bzr_mysql-5.1-rpl/18/mysql-5.1.28-pb18/mysql-test/r/mysqlbinlog_base64.result	2008-07-14 12:50:17.000000000 +0300
+++ /data0/pushbuild/pb2-2/pb/bzr_mysql-5.1-rpl/18/mysql-5.1.28-pb18/mysql-test/r/mysqlbinlog_base64.reject	2008-07-14 13:20:22.000000000 +0300
@@ -10,11 +10,6 @@
 drop table t1;
 drop table t2;
 select * from t1;
-a
-1
-4
-5
-select * from t2;
 word
 Aarhus
 Aaron
@@ -86,6 +81,9 @@
 Abernathy
 aberrant
 aberration
+select * from t2;
+word
+Ada
 flush logs;
 drop table t2;
 create table t2 (word varchar(20));
@@ -105,6 +103,6 @@
 flush logs;
 select count(*) from t2;
 count(*)
-35840
+70
 drop table t1;
 drop table t2;

mysqltest: Result content mismatch 

 - saving '/dev/shm/var-ps_row-151/3/log/main.mysqlbinlog_base64/' to '/dev/shm/var-ps_row-151/log/main.mysqlbinlog_base64/'

Retrying test, attempt(2/3)...

main.mysqltest                           [ skip ]. Test requires: 'not_as_root'

How to repeat:
xref: http://tinyurl.com/5cg3th

some locations:
https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=bzr_mysql-5.1-rpl&order=19, pb-valgrind/ps_row

https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=bzr_mysql-5.1-ndb-merge&order=..., sapsrv2/ps_row
[15 Jul 2008 16:01] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/49770

2629 Sven Sandberg	2008-07-15
      BUG#38127: main.mysqlbinlog_base64 fails sporadically on pushbuild
      This is not a fix to the bug. I'm just pushing a change to the
      test case that will produce debug info when the test fails next
      time.
[15 Jul 2008 16:05] Sven Sandberg
I've pushed a change to the test case that will produce debug info next time the test fails. I think that will shed light on what is happening.

When the bug is fixed, please remove the debug info again.
[16 Jul 2008 9:38] Sven Sandberg
Aha! The pushed debug info gave results!

The reason for the problem is that mysqlbinlog_base64 did not start with a clean binlog. Parts of the binlog from an earlier test run were therefore read when the mysqlbinlog command was issued.

The failure can be reproduced this way:

$ ./mysql-test-run.pl --parallel=1 --mysqld=--binlog-format=row binlog_start_comment mysqlbinlog_base64

The failure was sporadic because the new mtr runs tests in parallel threads, so it did not always happen that mysqlbinlog_base64 was executed right after binlog_start_comment on the same server.

The fix is to make include/have_log_bin.inc run 'RESET MASTER'. (We don't want test cases to clean up their binlogs, because when tests fail, their binlogs contain useful debug info.)
[16 Jul 2008 9:45] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/49809

2630 Sven Sandberg	2008-07-16
      BUG#38127: main.mysqlbinlog_base64 fails sporadically on pushbuild
      Problem: mysqlbinlog_base64 fails because the binlog contains
      traces from previous test cases.
      Fix: Make have_log_bin reset the master's binlog.
[30 Jan 2009 13:29] Bugs System
Pushed into 6.0.10-alpha (revid:luis.soares@sun.com-20090129165607-wiskabxm948yx463) (version source revid:luis.soares@sun.com-20090129163120-e2ntks4wgpqde6zt) (merge vers: 6.0.10-alpha) (pib:6)
[30 Jan 2009 15:10] Bugs System
Pushed into 5.1.32 (revid:luis.soares@sun.com-20090129165946-d6jnnfqfokuzr09y) (version source revid:sven@mysql.com-20080716095011-gmvwz83ejpeis45w) (merge vers: 5.1.28) (pib:6)
[30 Jan 2009 17:18] Paul DuBois
Test case changes. No changelog entry needed.
[17 Feb 2009 14:57] Bugs System
Pushed into 5.1.32-ndb-6.3.23 (revid:tomas.ulin@sun.com-20090217131017-6u8qz1edkjfiobef) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 16:45] Bugs System
Pushed into 5.1.32-ndb-6.4.3 (revid:tomas.ulin@sun.com-20090217134419-5ha6xg4dpedrbmau) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 18:21] Bugs System
Pushed into 5.1.32-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090217134216-5699eq74ws4oxa0j) (version source revid:tomas.ulin@sun.com-20090201210519-vehobc4sy3g9s38e) (merge vers: 5.1.32-ndb-6.2.17) (pib:6)