Bug #36785 Wrong error message when group_concat() exceeds max length
Submitted: 18 May 2008 15:55 Modified: 7 Mar 2010 18:37
Reporter: Davi Arnaut (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0, 5.1, 6.0 BK OS:Any
Assigned to: Davi Arnaut CPU Architecture:Any
Triage: Triaged: D4 (Minor)

[18 May 2008 15:55] Davi Arnaut
Description:
Error message does not get updated with the number of cut lines when group_concat() exceeds max length.

How to repeat:
set group_concat_max_len=5;
create table t1 (a int, b varchar(100));
create table t2 (a int, c varchar(100));
create table t3 (c varchar(100));
insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb");
insert into t2 values (1,"cccccccccc"),(2,"dddddddddd");
set @@sql_mode='traditional';
insert into t3 select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by t1.a;
ERROR HY000: %d line(s) were cut by GROUP_CONCAT()
[19 May 2008 22:39] 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/46834

ChangeSet@1.2645, 2008-05-19 19:39:24-03:00, davi@mysql.com +8 -0
  Bug#36785: Wrong error message when group_concat() exceeds max length
  
  The problem is that when ER_CUT_VALUE_GROUP_CONCAT is elevated
  to a error, message does not get updated with the number of cut
  lines when group_concat() exceeds max length.
  
  The solution is to modify the warning message to be more meaningful
  by giving the number of the line that was cut and to issue the warning
  for each line that is cut. This approach is inline with how other
  per-row truncated data warnings are issued avoids violating the warning
  internal interface.
[12 Jun 2008 19:11] Davi Arnaut
Queued to 6.0-runtime
[1 Dec 2008 17:16] Paul Dubois
I'll consider this a cosmetic change and skip the changelog entry.
[10 Nov 2009 18:27] Davi Arnaut
Queued to mysql-next-mr-runtime
[10 Nov 2009 18:27] 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/89993
[20 Nov 2009 12:55] Bugs System
Pushed into 5.6.0-beta (revid:davi.arnaut@sun.com-20091119234808-xbjpkwaxjt5x5c0b) (version source revid:davi.arnaut@sun.com-20090522170916-fzc5ca3tjs9roy1t) (merge vers: 6.0.12-alpha) (pib:13)
[20 Nov 2009 12:58] Bugs System
Pushed into 6.0.14-alpha (revid:kostja@sun.com-20091120124947-yi6h2jbgw0kbciwm) (version source revid:davi.arnaut@sun.com-20090522170916-fzc5ca3tjs9roy1t) (merge vers: 6.0.12-alpha) (pib:13)
[21 Nov 2009 23:59] Paul Dubois
Cosmetic change. No changelog entry needed.
[6 Mar 2010 10:56] Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:davi.arnaut@sun.com-20090522170916-fzc5ca3tjs9roy1t) (merge vers: 6.0.12-alpha) (pib:16)
[7 Mar 2010 18:37] Paul Dubois
No changelog entry needed.