Bug #40644 main.group_concat_max_len_func random failures
Submitted: 11 Nov 2008 16:45 Modified: 8 Dec 2008 16:05
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Server Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: Matthias Leich CPU Architecture:Any
Tags: sporadic

[11 Nov 2008 16:45] Matthias Leich
Description:
Found within tests of the build team on 5.1.30 2008-11-07
mysql-5.1.30/logs/Do-rpm-frigg30-5.1-advanced-gpl.sles10-i686.log.gz
--------------------------------------------------------------------
The protocoll is edited for better readability.
33132: main.group_concat_max_len_func [ fail ]
33133: 
33134: --- r/group_concat_max_len_func.result
33135: +++ r/group_concat_max_len_func.reject
33136: @@ -40,9 +40,9 @@
33137:  1	1	Record_1,R
33138:  2	2	Record_2
33139:  4	3	Record_4,R
33140: -7	4	Record_7,R
33141: +7	4	Record_7
33142:  Warnings:
33143: -Warning	1260	3 line(s) were cut by GROUP_CONCAT()
33144: +Warning	1260	2 line(s) were cut by GROUP_CONCAT()
and
33148: @@ -59,7 +59,7 @@
33149:  1	1	Record_1,Record_3,Re
33150:  2	2	Record_2
33151:  4	3	Record_4,Record_6
33152: -7	4	Record_7,Record_8
33153: +7	4	Record_7
33154:  Warnings:
33155:  Warning	1260	1 line(s) were cut by GROUP_CONCAT()

How to repeat:
This worked on mysql-5.1-bugteam last source change
around 2008-11-10:
---------------------------------------------------
<as user>:
   rm var (just to avoid a link pointing into a tmpfs)
<as root>:
   dd if=/dev/mapper/system-WORK2 of=/dev/null
           (high load on my disk where the test runs)
<as user>:
   ./mysql-test-run.pl \
   `perl -e 'for (1 .. 300) { print "group_concat_max_len_func "}'`
[13 Nov 2008 18:37] Matthias Leich
I assume this problem is caused by the MyISAM feature
concurrent_insert + weak testing code and not by a
server bug.
[14 Nov 2008 17:54] Matthias Leich
Experiment:
-----------
The MyISAM feature concurrent_insert = ON allows
that the following effect can happen:
   session 1: INSERT INTO t1
   session 2: <do not "see" the just inserted row>
   <some delay>
   session 2: <"see" the just inserted row>
My experience is that the delay is small and 
increases with the load on the testing box.

SET @@session.group_concat_max_len = 10;
INSERT into t1(rollno, name) values(1, 'Record_1');
INSERT into t1(rollno, name) values(2, 'Record_2');
INSERT into t1(rollno, name) values(1, 'Record_3');
INSERT into t1(rollno, name) values(3, 'Record_4');
INSERT into t1(rollno, name) values(1, 'Record_5');
INSERT into t1(rollno, name) values(3, 'Record_6');
INSERT into t1(rollno, name) values(4, 'Record_7');
SELECT id, rollno, group_concat(name) FROM t1 GROUP BY rollno;
(*) id rollno group_concat(name)                    
(*)  1      1 Record_1,R
(*)  2      2 Record_2
(*)  4      3 Record_4,R
(*)  7	    4 Record_7
(*) Warnings:
(*) Warning	1260	2 line(s) were cut by GROUP_CONCAT()

INSERT into t1(rollno, name) values(4, 'Record_8');
SELECT id, rollno, group_concat(name) FROM t1 GROUP BY rollno;
(**) id	rollno group_concat(name)
(**)  1	     1 Record_1,R
(**)  2	     2 Record_2
(**)  4	     3 Record_4,R
(**)  7	     4 Record_7,R
(**) Warnings:
(**) Warning	1260	3 line(s) were cut by GROUP_CONCAT()

(**) Is the result set expected by the current test.
(*)  Is the result set which we could get if the last
     row is not on disk. It equals the result set got
     during the failing run.
[14 Nov 2008 18:20] 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/58828

2709 Matthias Leich	2008-11-14
      Fix for Bug#40644 main.group_concat_max_len_func random failures
      + minor improvements
[17 Nov 2008 0:55] Patrick Crews
Ok to push.
Tested patch on Mac OSX 10.5 and Windows XP 32 bit without incident.
[26 Nov 2008 16:05] Matthias Leich
Pushed to
6.0-bugteam
5.1-bugteam
[8 Dec 2008 10:22] Bugs System
Pushed into 5.1.31  (revid:matthias.leich@sun.com-20081114182016-kmna73w3gir2q4be) (version source revid:patrick.crews@sun.com-20081126215253-rub0b9ykdsgx9fvl) (pib:5)
[8 Dec 2008 11:33] Bugs System
Pushed into 6.0.9-alpha  (revid:matthias.leich@sun.com-20081114182016-kmna73w3gir2q4be) (version source revid:satya.bn@sun.com-20081126062555-dw4wp7jun7hoysdb) (pib:5)
[8 Dec 2008 16:05] Paul DuBois
Test case changes. No changelog entry needed.
[19 Jan 2009 11:26] Bugs System
Pushed into 5.1.31-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090119095303-uwwvxiibtr38djii) (version source revid:tomas.ulin@sun.com-20090108105244-8opp3i85jw0uj5ib) (merge vers: 5.1.31-ndb-6.2.17) (pib:6)
[19 Jan 2009 13:04] Bugs System
Pushed into 5.1.31-ndb-6.3.21 (revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl) (version source revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl) (merge vers: 5.1.31-ndb-6.3.21) (pib:6)
[19 Jan 2009 16:10] Bugs System
Pushed into 5.1.31-ndb-6.4.1 (revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5) (version source revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5) (merge vers: 5.1.31-ndb-6.4.1) (pib:6)