Bug #43328 You tried to execute an empty string
Submitted: 3 Mar 2009 12:19 Modified: 4 Mar 2009 13:44
Reporter: Morten Andersen Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.2.16 OS:Microsoft Windows (XP running in VMWare)
Assigned to: CPU Architecture:Any

[3 Mar 2009 12:19] Morten Andersen
Description:
I get this message all the time:
You tried to execute an empty string. Please type an SQL command into the SQL edit field and execute again.

I am not sure why. it just happends from time to time, and I have not found out how to execute the query. I just close and reopen the query browser.

How to repeat:
I guess just some common use of the query browser will repeat this behavior. I am not able not to repeat it.
[3 Mar 2009 12:36] MySQL Verification Team
Thank you for the bug report. I assume you are using MySQL Query Browser, I got that message when the query panel is empty and I click the execute button. What is your case?. Please upgrade to version 1.2.17 to test if the new version presents the same behavior. Thanks in advance.
[3 Mar 2009 12:40] Morten Andersen
The error may be caused by having a blank line as the first line in the query.

1.
2. select now()

Fails

1. select now()

Works
[4 Mar 2009 13:35] Susanne Ebrecht
This is not a bug.

The cursor has to be placed at same line as the statement.
When you place the cursor on an empty line then of course the tool will try to execute an empty string.
[4 Mar 2009 13:44] Morten Andersen
Ok. This sounds like a very non-logical solution for the end user. I guess this "bug" will be reported many times in the future. Thanks.
[24 Sep 2009 15:53] Mike Loffland
So then you can't execute multiple statements within the query browser window? That seems a little goofy.
[20 Jan 2010 21:27] Brian Stevenson
Here's a perfect way to reproduce this bug/unexplained feature.

Use the "Create Stored Procedure / Function"  option from the Script tab and create a simple stored proc.

This will run fine in the window.

Now select all and copy, hit Ctrl T to open a new script window, paste the exact same SQL into the window and execute the query again.

This time you get the "You tried to execute an empty string" message.  The highlighting in the script window seems to indicate that you can click on either the if/drop section or the create section and run either separately, but not the whole thing.
[21 Nov 2010 0:20] David Capalbo
I'm using query browser 1.2.17 on windows 7 and I was running into the same issue only when creating a stored procedure with the following syntax:

delimiter //
create procedure getSites()
begin
select site_id,site from hosted_sites;
end //
delimiter ;

The issue occurs randomly, but I attest to the fact that in fact occurs. 

However, I worked around / Resolved the issue by instead running any "script like" SQL commands from a "Script Tab" instead of a "Resultset Tab" (Go to File/New Script Tab).

Hopefully I don't have the issue there.