Bug #12499 Quick "double click" on execute when executing script hangs QB
Submitted: 10 Aug 2005 15:00 Modified: 27 Sep 2005 12:11
Reporter: Anders Karlsson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:1.1.13 OS:Windows (Windows)
Assigned to: Mike Lischke CPU Architecture:Any

[10 Aug 2005 15:00] Anders Karlsson
Description:
When executing a script, QB will hang if "Execute" is clicked twice in fast succession, i.e. the Execute button is clicked a second time before it is greyed out. This only seems to happen when running a script. Sometimes, it also seems like this happens when opening QB and a refresh of the object browser to the right is still refreshing, in which case the "Execute" button is enabled (this can be seen if there are many object in the database, or the network connection is a bit slow). Just clicking "Execute" while this refresh is happening seems to cause QB to hang. None of this happens all the time, but mostly it does.

In general, it seems to be possible to kick of two simultaneous queries on the same connection from QB, which will hang it. A third way to get this is to force a refresh in the object window, and then klick "Execute" with a script active before the refresh is ready.

How to repeat:
Open query browser and connect to the "test" database.
Select File->New script tab.
In the new script tab, put a small SQL script, like this:
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 CHAR(100));
INSERT INTO t1 VALUES('xxx');
SELECT COUNT(*) FROM t1;
Klick "Execute" on the top right.
This should work fine.
When the Execute is ready, and the Browser is refreshed, click "Execute" twice fast in succession. Try a few times, QB will eventually hang.

Alternative reproduction:
Same script as in previous case in a Script tab just like them.
In the Object browser to the right, do a "right click" and Choose "Refresh". While the Refresh is running (have some procedures in the database, this seems to slow the refresh down a fair bit) click the "Execute" button.
Again, this cause fail always, but mostly.
[10 Aug 2005 15:01] Anders Karlsson
Tested on Windows against MySQL 5.0.10 on Linux (32bit)
[12 Aug 2005 17:26] Aleksey Kishkin
From 4 attempt, mysql query browser hangs. Cursor became sandwatch and qb didn't respond untill I kill it.
[12 Aug 2005 17:27] Aleksey Kishkin
I would say i wasn't able to reproduce it on linux. It hangs on windows only. Both server and qb I had on windows.
[27 Sep 2005 12:11] Mike Lischke
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