Bug #1991 Maybe an error in count syntax with GROUP BY
Submitted: 1 Dec 2003 12:26 Modified: 1 Dec 2003 12:59
Reporter: Andre Justus Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.0 OS:Linux (Debian3.0)
Assigned to: CPU Architecture:Any

[1 Dec 2003 12:26] Andre Justus
Description:
SELECT count(1) FROM table GROUP BY col
ignores the GROUP BY syntax and returns the count of all lines in table

How to repeat:
SELECT count(1) FROM table GROUP BY col
ignores the GROUP BY syntax and returns the count of all lines in table
[1 Dec 2003 12:53] Alexander Keremidarski
mysql> SELECT * FROM t;
+------+
| i    |
+------+
|    1 |
|    1 |
|    2 |
+------+
3 rows in set (0.00 sec)
 
mysql> SELECT count(1) FROM t GROUP BY i;
+----------+
| count(1) |
+----------+
|        2 |
|        1 |
+----------+

mysql> SELECT VERSION();
+-----------------------+
| VERSION()             |
+-----------------------+
| 4.1.1-alpha-debug-log |
+-----------------------+
[1 Dec 2003 12:59] Alexander Keremidarski
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/