[fdo-internals] MySQL Defect with Count(1)

Dan Stoica dan.stoica at autodesk.com
Thu May 1 11:06:35 EDT 2008

Hi Bruno,

Quick question: why do you need Count(1)? For performance perhaps?


-----Original Message-----
From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Bruno Scott
Sent: Tuesday, April 29, 2008 2:37 AM
To: fdo-internals at lists.osgeo.org
Subject: Re: [fdo-internals] MySQL Defect with Count(1)

By the way i have found the same piece of code in the sqlserver provider

Bruno Scott wrote:
> I just found and enter a ticket about this one.
> I've been a little further.
> Select Count(1) failes with "Unsupported FDO type in expression"
> It was working ok in release 3.2
> I think i have found were the problem is.
> ProcessAggregateFunction has been overridden in release 3.3 ( to handle
> ALL and distinct i guess)
> extract of ProcessAggregateFunction  function
>             if (dataValue->GetDataType() == FdoDataType_String)
>             {
>                 // Omit ALL if specified as this keyword is not supported
> in
>                 // MySQL.
>                 ...
>             }
>             else
>                 throw FdoFilterException::Create(NlsMsgGet(FDORDBMS_29,
> "Unsupported FDO type in expression"));
> As 1 is not a string -> boom
> I have tried with
> Select Count('1') and it works fine

View this message in context: http://www.nabble.com/MySQL-Defect-with-Count%281%29-tp16939555p16953704.html
Sent from the FDO Internals mailing list archive at Nabble.com.

fdo-internals mailing list
fdo-internals at lists.osgeo.org

More information about the fdo-internals mailing list