Bug #8505 BNF Analysis for select count(*) statement
Submitted: 14 Feb 2005 21:04 Modified: 14 Feb 2005 22:25
Reporter: Clebert Suconic Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:4.1.9-nt OS:Windows (Windows)
Assigned to: Sergei Golubchik CPU Architecture:Any

[14 Feb 2005 21:04] Clebert Suconic
Description:
When doing any select count(*) from <table>, if you keep a space between count and (*), mysql identifies it as an invalid syntax.

Most databases would parse it without any problem.

This is a problem for us, as we need to run a benchmark comparing JBoss and MySQL against other databases. Specj's code has some code with this kind of statement embebbed.

There is certain rules from spec.org which limits us for changing their Benchmark, and any change has to be documented. As this is a small change, maybe this would be improved into mysql's code.

How to repeat:
execute:

select count (*) from mysql.users;

instead of

select count(*) from mysql.users;

Suggested fix:
consider "count (*)" as same as "count(*)"
[14 Feb 2005 21:27] MySQL Verification Team
Should be a feature request.
[14 Feb 2005 21:38] Clebert Suconic
Changed as suggested.
[14 Feb 2005 21:39] Clebert Suconic
I meant... changed to Feature Request as suggested.
[14 Feb 2005 21:41] Clebert Suconic
Here in JBoss we have this issue documented as well:

http://jira.jboss.org/jira/browse/JBBENCH-28
[14 Feb 2005 22:25] Sergei Golubchik
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Additional info:

See http://dev.mysql.com/doc/mysql/en/server-sql-mode.html

in particular "IGNORE_SPACE"