Bug #7232 Query browser crashes on syntax error
Submitted: 13 Dec 2004 13:40 Modified: 13 Dec 2004 14:36
Reporter: Sigmund Lahn Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.07b OS:Windows (Windows XP SP2)
Assigned to: CPU Architecture:Any

[13 Dec 2004 13:40] Sigmund Lahn
Description:
In a select statement, if you (like I did) mix up the syntax and place the LIMIT before the ORDER BY, the entire query browser crashes, with the alert

"GLib-ERROR **: gmem.c:140: failed to allocate 4294967274 bytes aborting..."

and then MS Visual C runtime library gets involved: 
"Runtime error!
Program: ..MySQL\GUItools\MySQL Query Browser\MySQLQueryBrowser.exe
This application has requested the runtime to terminate in an unusual way.Please contact the applications support team for more inforamtion."

Running on mysql 4.0.21 (max-nt)
Query browser release 1.07beta

How to repeat:
SELECT * FROM any_of_your_tables
LIMIT 20, 67
ORDER BY any_col

Suggested fix:
Optimal: The browser shold inform you of the syntax error, and keep running

Next best thing: The browser should request the runtime to terminate in an usual way.
[13 Dec 2004 14:36] MySQL Verification Team
Testing against QB 1.1.3 I got the correct message error:

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 'order by user' at line 1
[13 Dec 2004 14:38] Sigmund Lahn
Good, then its fixed in newer versions.