Bug #17031 cursor on a commented sql not run,
Submitted: 2 Feb 2006 5:24 Modified: 21 Nov 2006 11:26
Reporter: Wing Lap Leung Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.1.19 OS:Windows (Windows XP Prof SP2)
Assigned to: Mike Lischke CPU Architecture:Any
Tags: Source Editors

[2 Feb 2006 5:24] Wing Lap Leung
Description:
2 SQL statments, one is commented in one line, another is uncommented in another line. When a cursor is within a commented line, the SQL not run.  When a cursor is within an uncommented line, the SQL run.

How to repeat:
Steps:
1. create 2 SQL statements in 1 tab, with format like this:

select * from <table1>;
select * from <table2>

2. comment the first one, which produce:
#select * from <table1>;
select * from <table2>

3. Now crucial: put the splinked text input cursor within the commented SQL, like this:
|#select * from <table1>;
select * from <table2>
(| before # is your text cursor)

4. press Ctrl + Enter, a dialog box appear to alert you that you tried to execute  an empty string!!!

If you put your cursor within the uncommented SQL, like this:
#select * from <table1>;
|select * from <table2>

And press Ctrl + Enter, the query run successfully!

To remind again, above 2 SQL statements are on the SAME TAB, i.e. same text area, with one commented, another one not.
[8 Feb 2006 8:33] Valeriy Kravchuk
Thank you for a bug report. Verified just as described on XP.

As for highlighted text "disappering" - it is a known bug, reported many times already.
[21 Nov 2006 11:26] Mike Lischke
This is not a bug but expected behavior. If you comment out your query in the first line then yes, this line is then empty and trying to execute it results in the mentioned message. Write anything before the comment char and you will see it is executed then.