Bug #2664 An extra space after Count in a Count(distinct... statement fails
Submitted: 6 Feb 2004 8:19 Modified: 6 Feb 2004 8:32
Reporter: Jeffrey Jones Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.6 OS:Linux (Linux)
Assigned to: Dean Ellis CPU Architecture:Any

[6 Feb 2004 8:19] Jeffrey Jones
Description:
I use Brio, and the query it generates puts a space after count in a count(distinct.... select statement.

How to repeat:
Create table a with a column of a
select count(distinct a) from a;    This will work
select count (distinct a) from a;   This will fail

Suggested fix:
Allow spaces to be ignore after count and other internal functions
[6 Feb 2004 8:23] Jeffrey Jones
I found the setting in the ODBC handler to ignore spaces after function names and fixed the problem.
[6 Feb 2004 8:32] Dean Ellis
This is also documented in the manual:

http://www.mysql.com/doc/en/Functions.html

Thank you.
[15 Apr 2006 21:02] JP Fasano
When configuring the ODBC connection I was able to set the Initial Statement to be "SET SESSION sql_mode=IGNORE_SPACE".  I am using Win XP.