Bug #97628 | Wrong result with rollup | ||
---|---|---|---|
Submitted: | 14 Nov 2019 8:51 | Modified: | 4 Feb 2020 14:51 |
Reporter: | Hope Lee (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 8.0.16, 8.0.18, 8.0.11 | OS: | CentOS |
Assigned to: | CPU Architecture: | Any |
[14 Nov 2019 8:51]
Hope Lee
[14 Nov 2019 8:59]
Hope Lee
Sorry, the one with distinct is correct, the one without is wrong. The title should be adjusted.
[14 Nov 2019 9:04]
MySQL Verification Team
Hello Lee, Thank you for the report and test case. regards, Umesh
[4 Feb 2020 14:51]
Jon Stephens
Documented fix in the MySQL 8.0.20 changelog as follows: A query returned inaccurate results when an expression in a GROUP BY clause used a column name differing in case from that used for the name of the column when the table containing this column was created. An example of this would be when the query used GROUP BY id although the column name as shown in the original CREATE TABLE statement was ID. This occurred because, the server performed case-sensitive comparisons of column names in expressions with names of columns in tables. This issue is fixed by ensuring that such comparisons are performed in a case-insensitive fashion as expected. Closed. Note that this also fixes BUG#98222.