SQL select query never returns result

rlaudens posted 7 years ago in Running SQL scripts

We are experiencing a strange issue with the latest HeidiSQL versions of the last couple of days/weeks (NB: I used to update every time I got asked by the autoupdate):

I have a rather simple select query (see below), which I execute regularly, just editing some of the conditions (e.g. '20002' instead of '20031' or "activating" an additional clause by removing the #, etc.) <= trying to say this is a proven simple query.

Since 2-3 weeks the query never returns a result and Heidi just hangs. when I launch a second Heidi session and I look into the process list I find this connection in Command "Sleep" and an empty status. I have to kill the Heidi process.

What I find strange is that there is no active Command and that I don't see "Sending Data". When I kill the SQL session the associated Heidi instance does not return with an error (it used to do that in the past when I killed a query which run to long).

Please let me know what else you need to know.

SQL server version is MySQL 5.1.53

Please help me to get back my loved Heidi


select pt.store_id as 'Restaurant', pt.date_time as 'Transaction Date', pt.pos_num as 'Register', pt.acquirer_TID as 'TID', pt.local_amount/100 as 'Amount', pt.recp_num as 'Sequence Counter', pt.trans_type as 'transaction Type', pt.acquirer_ID as 'Card Name' , pt.error_code as 'Error', pt.extra_data as 'Extra Info'
from ncrecs.pos_transactions as pt
where pt.store_id in ('20031')
#and pt.acquirer_TID in ('30371779')
and pt.date_time > date_add(now(), interval -2 hour)
#and pt.trans_type in ('D','F','P','T','R','S')
order by pt.acquirer_TID, pt.date_time
ansgar posted 7 years ago
The exact HeidiSQL revision is always useful when reporting issues.

This is most probably what issue #2329 describes in a slightly different way, but with the same symptoms. Query execution is outsourced in a separate thread since some revisions, and there is a logic which says: if a user clicks elsewhere and triggers another query, wait for the thread to finish and block that click. This logic fails in some situations which I will have to figure out.
rlaudens posted 7 years ago
Hi Anse,

Thanks for getting back so quickly!

I did some more test and excluded some potential reasons in my installation.

As I did state I had every day upgraded to the latest HeidiSQL. Today I did test with Revision 3733 which shows exactly the error described and yes it matches the issue #2329.

One additional thing I noted today is that the session had dropped on the server - I could not find the session any longer, however in I have normally seen the session to remain in sleep mode - killing it did not restore the HeidiSQL window.
However this hanging HeidiSQL is coming up with an "save Query" dialog when I perform a shutdown - so it's not completely crashed.

I did downgrade to Version 3603 and the issue no longer reproduceable. Again I can't tell exactly as of which Revision the issues surfaces, however I think it must have happened in the last 4 weeks.

Let me know if you have any version you want me to test for this issue. HeidiSQL saved me so much time already I'd be happy to help fix/improve it smile

PS: the issues happens on XP2002SP3 as well as Win7
djdjohnson posted 7 years ago
I'm having this same issue. HeidiSQL is next to useless to me, as it hangs without showing any results pretty regularly. Version number is status message in the lower right says "Setting up result grid(s) ..."

I hope this gets fixed soon. I can't use the latest version of HeidiSQL right now.
ansgar posted 7 years ago
Will be the next thing to fix, after I have done the MSSQL support.
rlaudens posted 7 years ago
any update or timeline on this issue?
I'd love to have my favorit tool back :-)
ansgar posted 7 years ago
I already fixed one similar bug like this, and this one is a more rare one - only occurring when you were disconnected and then fire a query. But issue #2329 will of course get some attention soon.

Please login to leave a reply, or register at first.