Bug #39931 random failures of rpl.rpl_temporary
Submitted: 8 Oct 2008 13:29 Modified: 27 Jan 2009 15:31
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Replication Severity:S3 (Non-critical)
Version:5.0 OS:Any
Assigned to: Matthias Leich CPU Architecture:Any
Tags: pushbuild, rpl_temporary, sporadic, test failure

[8 Oct 2008 13:29] Matthias Leich
Description:
Typical effect found in
- Pushbuild
  The failure happens quite often but unfortunately
  xref does not show it
- when trying to reproduce the bad effect on my box with
  ./mysql-test-run.pl --mem --suite=rpl \
      `perl -e 'for (1 .. 100) { print "rpl_temporary "}'`
==========================================================
--- ... rpl_temporary.result ...
+++ ... rpl_temporary.reject ...
@@ -26,6 +26,7 @@
 insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
 create temporary table t3(f int);
 insert into t3 select * from t1 where f<6;
+Timeout in wait_condition.inc for SELECT COUNT(*) = 5 FROM t3
 create temporary table t3(f int);
 insert into t2 select count(*) from t3;
 insert into t3 select * from t1 where f>=4;
@@ -34,7 +35,7 @@
 drop temporary table t3;
 select * from t2 ORDER BY f;
 f
-5
+0
 7
 drop table t1, t2;
 use test;

The reason is the MyISAM feature concurrent_insert.
http://dev.mysql.com/doc/refman/6.0/en/concurrent-inserts.html
One connection orders the insertion of some rows,
than a second connection runs an INSERT ... SELECT
which starts before all rows inserted by the first connection
are visible for the second one.

How to repeat:
See above
[8 Oct 2008 16:35] Matthias Leich
I vote for
- P2 because this problem happens quite often
  in at least 5.1 and 6.0
- starting the fix in 5.0, because the test
  and the concurrent_insert feature exists
  also in 5.0.
[9 Oct 2008 10:31] Vemund Østgaard
Looks similar to what is reported here: http://bugs.mysql.com/bug.php?id=37521
[29 Oct 2008 12:38] Sven Sandberg
xref: http://tinyurl.com/6qptu9
[29 Oct 2008 13:12] Sven Sandberg
Failed, e.g., here:
https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=bzr_mysql-5.1-5.1.29-rc&order=... sapsrv2/n_mix
[14 Nov 2008 20:03] Matthias Leich
The effect reported by me is/was a weakness of the testcase
and was fixed by us on the fevelopers conference.
Name of the changesets when pushed into the main tree:
5.1: revno: 2646.74.16
     committer: Georgi Kodinov <kgeorge@mysql.com>
     branch nick: merge-5.1-bugteam
     timestamp: Tue 2008-10-07 19:54:12 +0300
     message:
        fixed test suite failures in 5.1-bugteam
6.0: revno: 2497.434.8
     committer: Georgi Kodinov <kgeorge@mysql.com>
     branch nick: merge-5.1-bugteam
     timestamp: Tue 2008-10-07 19:54:12 +0300
     message:
        fixed test suite failures in 5.1-bugteam
The test was not fixed in 5.0 (BTW: There are
several other improvements which were not ported
to 5.0).
I do not know why we have no automatic generated entries
about the pushes within this bug.

It occured in Pushbuild last time
   2008-10-08 09:08:00 	bzr_mysql-5.1-5.1.29-rc
This corresponds with last the comment of Sven.

It is/was a weakness of the testcase.
[7 Jan 2009 13:05] Matthias Leich
The fix was pushed to 5.1 and 6.0
bugteam and main trees in October 2008.
[27 Jan 2009 15:31] Paul DuBois
Test case changes. No changelog entry needed.