Bug #4548 Incorrect results from query
Submitted: 14 Jul 2004 16:04 Modified: 21 Jul 2004 10:39
Reporter: Matthew Moody Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S1 (Critical)
Version:1.0.2 Alpha OS:Windows (Win2k)
Assigned to: Michael G. Zinner CPU Architecture:Any

[14 Jul 2004 16:04] Matthew Moody
Description:
This bug is two-fold:

1. MySql does not allow zero space between comment delimiter and the line being commented out, but the browser recognises the line as a comment.

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 '--SELECT * FROM celltrack.client
SELECT * FROM celltrack.users

2. After correcting the line, an empty recordset is returned.

How to repeat:
--SELECT * FROM Table1
SELECT * FROM Table2
error is returned

-- SELECT * FROM Table1
SELECT * FROM Table2
empty recordset returned

SELECT * FROM Table1
-- SELECT * FROM Table2
Table1 recordset returned

SELECT * FROM Table2
Table2 recordset returned

Suggested fix:
Allow zero space between comment delimiter and the line being commented
[20 Jul 2004 6:02] Matthew Lord
Using 1.0.3 Alpha you still get an sql syntax error when you do not have a space after the --
like --select * from test;

#select * from test; is fine
/*select * from test*/ is fine as well.
[21 Jul 2004 10:39] Michael G. Zinner
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