[MDEV-25957] Order is not kept when using DISTINCT + ORDER BY in GROUP_CONCAT Created: 2021-06-18 Updated: 2021-06-18 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Procedure |
| Affects Version/s: | 10.5.8 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Wataru Maeda | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS 7.9, Docker |
||
| Description |
|
The ORDER BY clause in the GROUP_CONCAT function allows you to specify the order, but if you add DISTINCT, the order will not be as expected.
Here, I concatted the `ranking` in the order of `year`.
Then I added DISTINCT.
I tried the same thing with MySQL 5.7, and got the same result. Is it possible that the order is not kept when DISTINCT is added to the GROUP_CONCAT function? |
| Comments |
| Comment by Daniel Black [ 2021-06-18 ] |
|
I think this might be duplicate of MDEV-22089 |
| Comment by Wataru Maeda [ 2021-06-18 ] |
|
Thank you for your comment. In MDEV-22089, if I try `set tmp_table_size=102400;` then I got the correct result, but in my problem case I did not get the correct result. |