Bug #6091 Incorrect GROUP BY/ORDER BY order causes crash
Submitted: 14 Oct 2004 11:14 Modified: 3 Nov 2004 16:13
Reporter: Chris Munasinha Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.0.8 beta OS:Windows (Win2K SP4)
Assigned to: Victor Vagin CPU Architecture:Any

[14 Oct 2004 11:14] Chris Munasinha
Description:
When manually creating a query, putting the GROUP BY before the ORDER BY causes a crash. Obviously the query is not destined to work, but whereas incorrectly formed queries normally return the MySQL error, this one causes a "GLib-ERROR **: gmem.c:140: failed to allocate xxx bytes aborting..." and the program bombs out with a MS VC++ Runtime Error.

How to repeat:
Create a query with a bad group by. The one I used was:

SELECT COUNT(field_1), field_2 FROM table_1
ORDER BY field_2
GROUP BY field_2

Strangely even though these table don't exist I still get the error with this EXACT query....
[3 Nov 2004 16:13] Victor Vagin
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html