Bug #112390 | The group by combined with GROUP_CONCAT will return undefined result | ||
---|---|---|---|
Submitted: | 19 Sep 2023 14:58 | Modified: | 21 Sep 2023 11:55 |
Reporter: | karry zhang (OCA) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | MySQL 5.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[19 Sep 2023 14:58]
karry zhang
[21 Sep 2023 2:41]
karry zhang
And I found the join operation is necessary to reproduce this problem.
[21 Sep 2023 11:55]
MySQL Verification Team
Hi Mr. zhang, Thank you for your bug report. However, this is not a bug. MySQL follows SQL standard strictly. Hence, if any field in the SELECT list is not included in the GROUP BY statement, then any random value can be selected from the subset of values originating from columns in the GROUP BY clause. Hence, the only solution of your problem is to include: `t2`.`UID` AS `XSDMXID` in the GROUP BY clause. Not a bug.