Hi!

> Hi Ronald

Roland here ;)

>> Arjen, there is no logic reason to require that all non aggregate
>> expressions in the SELECT list are used in the GROUP BY.
>
> "correctness" might be one ;-)

That was the point. It can be correct without having a full group by,
so there is no logical reason to demand full group by.

>> The true fix would be to only allow non-aggregate expressions in the
>> SELECT list that are functionally dependent upon the GROUP BY list
>> (and this would be in accordance with the 1999 and 2003 versions of
>> the SQL standard). However, I fear that this is not a trivial fix.
>
> Yep that's what I was suggesting. I don't know how complex the fix really
> is.

I though your suggestion was to fix http://bugs.mysql.com/bug.php?id=8510
The bug report for 8510 essentially describes that aggregate
expressions are not recognized as aggregate expressions, which leads
to a problem in case of a forced full group by.

I suggested to disallow non-aggregate expressions in the select list
in case these are not functionally dependent upon the expressions in
the group by clause. So, this would allow non-aggregate expressions in
the SELECT even if these are not included in the GROUP BY list,
provided it is safe to do so (and it is always safe if the
non-aggregate expression is functionally dependent upon the group by
list)

> Sometimes bugs @ MySQL get noted as being more complex than they really are,
> and it also relates to surrounding infrastructure which Drizzle may not have
> to deal with. So what I was suggesting to Brian is to look at it from this
> perspective, if it's not a highly complex bug to fix, either fix it now or
> list it as a bug so that it will get fixed.

That's fine. I am just observing that you are suggesting to force
behaviour in accordance to SQL:92 whereas I am favoring compliance
with SQL:99

...

> I wouldn't want the ONLY_FULL_GROUP_BY behaviour as it is now.

Agree. If full group by is to be forced, it should be done in
accordance with SQL 92 (which effectively boils down to fixing 8510).
However, if full group by is to be removed, it would be great if it
could be in accordance with SQL:99 (that is, allow non aggregate
expressions in the SELECT only if they are functionally dependent upon
the GROUP BY list, even if they are not themselves part of the GROUP
BY list)

Regards,

Roland

>
>
> Regards,
> Arjen.
> --
> Arjen Lentz, Founder @ Open Query
> Training and Expertise for MySQL in Australia and New Zealand
> http://openquery.com.au/training/  (ph. +61-7-3103 0809)
>
>
>
>
>
>



-- 
Roland Bouman
http://rpbouman.blogspot.com/

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to