Bug #84720 | WITH ROLLUP not providing expected NULL values | ||
---|---|---|---|
Submitted: | 30 Jan 2017 12:09 | Modified: | 30 Jan 2017 12:42 |
Reporter: | Simon Mudd (OCA) | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 5.6.27,5.7, 5.7.17 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | rollup |
[30 Jan 2017 12:09]
Simon Mudd
[30 Jan 2017 12:14]
Simon Mudd
Correction: The second column of the last 2 rows should be NULL.
[30 Jan 2017 12:15]
Simon Mudd
Adjust Synopsis
[30 Jan 2017 12:42]
MySQL Verification Team
Hello Simon, Thank you for the report and test case. Thanks, Umesh
[30 Jan 2017 13:04]
Ruud H.G. van Tol
Found a non-enum test case: SELECT tablename , 10*((0+`at`) DIV 1000) AS _ymd_HM , action , COUNT(*) FROM rollup_enum_bug GROUP BY 1 ,10.0*((0+`at`) DIV 1000),3 WITH ROLLUP; The column-definition has '10', but the 'group by' definition has '10.0'.
[30 Jan 2017 13:13]
Ruud H.G. van Tol
Same with the '0' and '0.0' in this one: SELECT tablename, 0+`at` AS _at, COUNT(*) FROM rollup_enum_bug GROUP BY 1, 0.0+`at` WITH ROLLUP;
[30 Jan 2017 13:19]
Ruud H.G. van Tol
See also: https://bugs.mysql.com/bug.php?id=25373 http://stackoverflow.com/questions/659845/mysql-total-group-by-with-rollup-curiosity https://bugs.mysql.com/bug.php?id=24856