Stop query loop on reconnect.
| User, date | Message |
|---|---|
|
Written by imre
2 years ago Category: Running SQL scripts 7 posts since Thu, 30 Dec 10 |
Hello, If i run a script with many queries and connection is lost then heidy automatically reconnects and continues the query loop from next(?) item. This is a problem for me. For example if i use transactions then after reconnect the script does not run in transaction anymore and yields inconsistent result. Same case when using variables / temporary tables. What do you think of making query loop to not continue in case of reconnects or at least make it optional? Thank you. |
|
Written by ansgar
2 years ago 3973 posts since Fri, 07 Apr 06 |
Reconnecting is done *before* executing a query. Queries are never skipped. The only situation when that can happen is if the query itself produces a huge query or takes longer to finish as idle_timeout allows. What was the cause of your reconnect? |
|
Written by imre
2 years ago 7 posts since Thu, 30 Dec 10 |
For example, when thread is killed. runnign the script:
Log:
Result tabs:
|
|
Written by ansgar
2 years ago 3973 posts since Fri, 07 Apr 06 |
Ok - the query was somehow causing a disconnect. But a query should not get executed again if when that happens. That would mean you are stuck in some endless loop, would it? |
|
Written by imre
2 years ago 7 posts since Thu, 30 Dec 10 |
I agree. Just to clarify again: In that example I opened the second Heidi instance and killed the server thread manually while it was running the 2nd query. If i just plug the network cable then it gets timeout in around 5 seconds and works as expexted. So its not that critical than i thought, but still i must take into account i cannot kill the server thread to stop execution which means killing the heidisql.exe is the only option. |
|
Please login to leave a reply, or register at first. |