Bug #22401 select count (*) from .. returns SQL sytax error
Submitted: 15 Sep 2006 18:02 Modified: 15 Sep 2006 18:53
Reporter: Josef Raffeiner Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.21 OS:Novell NetWare (Netware 6.0)
Assigned to: CPU Architecture:Any
Tags: count (*), SELECT

[15 Sep 2006 18:02] Josef Raffeiner
Description:
Microstation ODBC database connect returns: table mscatalog did not exist ...

the ODBC log  reports:
ustation        e38-680	ENTER SQLExecDirect 
		HSTMT               03503A78
		UCHAR *             0x03AFBE68 [      -3] "select count (*) from category where mslink in (select category from ugcategory)\ 0"
		SDWORD                    -3

ustation        e38-680	EXIT  SQLExecDirect  with return code -1 (SQL_ERROR)
		HSTMT               03503A78
		UCHAR *             0x03AFBE68 [      -3] "select count (*) from category where mslink in (select category from ugcategory)\ 0"
		SDWORD                    -3

		DIAG [23000] [MySQL][ODBC 3.51 Driver][mysqld-5.0.21]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*) from category where mslink in (select category from ugcategory)' at line 1 (1064) 

How to repeat:
Mysql Query Browser:
select count (*) from category where mslink in (select category from ugcategory);
[15 Sep 2006 18:53] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

See also http://dev.mysql.com/doc/refman/5.0/en/functions.html