Bug #1456 | cast with union and group by with rollup displays incorrect results | ||
---|---|---|---|
Submitted: | 1 Oct 2003 8:23 | Modified: | 11 Dec 2003 12:03 |
Reporter: | Georg Richter | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.1.1 | OS: | |
Assigned to: | MySQL Verification Team | CPU Architecture: | Any |
[1 Oct 2003 8:23]
Georg Richter
[11 Dec 2003 9:36]
MySQL Verification Team
Worked just fine for me with latest 4.1.2: mysql> select year, sum(profit)*1.16 from t1 group by year union all select year, cast(sum(profit) as signed) from t1 group by year with rollup; +------+------------------+ | year | sum(profit)*1.16 | +------+------------------+ | 2000 | 116.00 | | 2001 | 232.00 | | 2002 | 580.00 | | 2003 | 464.00 | | 2000 | 100.00 | | 2001 | 200.00 | | 2002 | 500.00 | | 2003 | 400.00 | | NULL | 1200.00 | +------+------------------+ 9 rows in set (0.01 sec)
[11 Dec 2003 12:03]
MySQL Verification Team
Fixed in 4.1.2.