Bug #9235 | Rollup of a calculated column has wrong values | ||
---|---|---|---|
Submitted: | 16 Mar 2005 23:37 | Modified: | 31 May 2005 15:35 |
Reporter: | Peter Gulutzan | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 5.0.3-alpha-debug | OS: | Linux (SUSE 9.2) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[16 Mar 2005 23:37]
Peter Gulutzan
[31 May 2005 15:35]
Igor Babaev
This bug was fixed by the patch for bug #7894 (for 4.1 and 5.0) Now we have: mysql> select s1,s1+sum(s2) from t10 group by s1; +------+------------+ | s1 | s1+sum(s2) | +------+------------+ | 1 | 2 | | 2 | 4 | | 3 | 6 | +------+------------+ 3 rows in set (0.40 sec) mysql> select s1,s1+sum(s2) from t10 group by s1 with rollup; +------+------------+ | s1 | s1+sum(s2) | +------+------------+ | 1 | 2 | | 2 | 4 | | 3 | 6 | | NULL | NULL | +------+------------+ 4 rows in set (0.00 sec)