[MDEV-8781] Bug with group by & group_concat Created: 2015-09-09  Updated: 2015-09-10  Resolved: 2015-09-10

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 10.0.19
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Marc T. Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: upstream
Environment:

Win x64



 Description   

Hello,

We spot a bug with group by & group_concat, here is the simplified test case :

– Step 1 create a temp table with 2 different rows of 1025 char (datatype is text)

drop temporary table if exists _test;
create temporary table _test as
select lpad('a', 1025, '0') as chaine
union
select lpad('b', 1025, '0');

– This result is OK

select *
from _test
group by chaine;

– In this query, all is grouped, it should not !

select group_concat(chaine)
from _test
group by chaine;

– we found an ugly workaround...

select group_concat(chaine)
from _test
group by crc32(chaine);

This is an upstream bug, i reported it here :
http://bugs.mysql.com/bug.php?id=78383

Tested on MySQL 5.5.39, MySQL 5.6.26, MariaDB 10.0.19



 Comments   
Comment by Elena Stepanova [ 2015-09-10 ]

As Hartmut commented in the upstream bug report, it is actually a documented behavior, there are still some questions about it, so lets see what MySQL responds.

Comment by Elena Stepanova [ 2015-09-10 ]

Upstream closed it as not-a-bug.
Here is Hartmut's comment from the upstream bug report, for future reference:

It turned out the limiting factor is max_sort_length, which is documented behavior after all, but it's strange that this documented limitation only kicks in in the TEXT/GROUP_CONCAT()/GROUP BY scenario while in the other cases comparison was not limited by this ...

Comment by Marc T. [ 2015-09-10 ]

OK, this is not a bug, but this seem so odd !

Generated at Thu Feb 08 07:29:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.