Minor (but easily fixable) crash

[expired user #9424]'s profile image [expired user #9424] posted 8 years ago in General Permalink
I tried to find a dedicated place where I could report bugs but wasn't able to, so here goes..

1) create a table with a little data in it
2) open it with the "data" tab
3) click the "filter" button, and enter an invalid filter (but don't apply it)
4) click one of the columns in the data table, causing an ORDER BY query

HeidiSQL will now attempt to order the data, using the bad filter. A dialog box will be shown about the invalid sql statement (which is ok), after which HeidiSQL crashes (not so ok).

I ran into it by mistake. As it's unlikely to happen to very many people, I'd say that it's minor - but it feels like it should also be quick and easy to fix. I'm using 9.3.0.4984 under wine on Debian Linux.
3 attachment(s):
Code modification/commit from ansgarbecker, 8 years ago, revision 9.3.0.5009
Postpone repaint of the data grid to later, after click on a header column with a bad WHERE filter. Fixes a crash in VirtualTree, when handling the click somewhere. See http://www.heidisql.com/forum.php?t=19832
ansgar's profile image ansgar posted 8 years ago Permalink
Should be fixed in r5009. I thought my fix would have bad side effects on repainting the grid, but it works fine here. Please update and check yourself.
[expired user #9424]'s profile image [expired user #9424] posted 8 years ago Permalink
I don't get the crash after clicking the SQL error dialog box any longer so it's definitely an improvement, but the table looks odd afterwards - it's empty without any results, and the column names aren't there any longer. Clearing the filter resets it to a good state again. Maybe it's nitpicking, but I'd imagine that somebody coming across this later on would be confused by how the table looks like after the error. I guess that if an error occurs during the execution of the SELECT, the grid ideally shouldn't change at all?

Screenshots before and after clicking the "ok" button in the SQL error dialog box attached.
2 attachment(s):
  • Screenshot-from-2015-11-12-16-39-34
  • Screenshot-from-2015-11-12-17-31-54
[expired user #9424]'s profile image [expired user #9424] posted 8 years ago Permalink
Maybe the "after" screenshot I attached was a bit too restricted. A full screenshot is attached to this post.
1 attachment(s):
  • Screenshot-from-2015-11-12-17-43-25
ansgar's profile image ansgar posted 8 years ago Permalink
That's intentionally. If you write a bad WHERE filter, run it, then restart HeidiSQL, you will see the same thing.
[expired user #9424]'s profile image [expired user #9424] posted 8 years ago Permalink
Ah, right. In that case, thanks for the quick fix, and the overall really good software. HeidiSQL is the best SQL editor I know of. I'll be donating :).

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