2 bugs concerning query log and update process

[expired user #5249]'s profile image [expired user #5249] posted 13 years ago in General Permalink
1.)

bug:
when clearing the query log, the first line is not indexed by number 1 again but by last row number + 1.

reproduction:
i think thats obvious ;)

solution:
simply reset the counter for row numbers?

2.)

bug:
when update tries to restart heidi, and there are unsaved query tab/database objects existing, you are asked whether saving these or not.
this question, however, pop ups every second. consequently there's barely time to realy save everything as the next pop up would bring the save dialog to the background anyway. the only way to exit this loop is to deny or to cancel this dialog.

solution:
as i see it, the heidisql_updater.exe polls the actual heidisql.exe for closing every second in order to report possible timeouts etc. this obviously causes the main form to fire the closequery event as frequently.
--> moving code for checking for unsaved queries/objects to seperate function (lets say CheckUnsaved) and call it in this special case before executing the updater. the CheckUnsaved function itself checks some boolean variable indicating whether update proccess is running so that further message boxes are not popping up.

here's some example code (as i think my description could confuse a little bithappy)

----------------------------------
var IsUpdating: Boolean;

function CheckUnsaved: Boolean;
begin
...
end;

procedure TMainForm.CloseQuery;
begin
if not IsUpdating then
CanClose := CheckUnsaved;
end;

// procedure which calls the _updater.exe; didn't look up its
//exact name in the source
procedure Update;
begin
CheckUnsaved;
IsUpdating := True;
Execeute('HeidiSQL_updater.exe');

// enable checking for the closequery event again in case of
// any errors
IsUpdating := False;
end;
----------------------------------

i hope my report helps :D
ansgar's profile image ansgar posted 13 years ago Permalink
1) The gutter index is intentionally not reset - so users have a hint that there were lines before.

2) As long as the popup lives there is no successive popup, so you should be able to save or press "No".
[expired user #5249]'s profile image [expired user #5249] posted 13 years ago Permalink
ok, i completely agree with your opinion at the first point.

at the second point i would recommend you to try it out. simply do some changes to a query tab and after that do an attempt to update heidi. you gonna notice the dialog asking you what to do is popping up about every 1-2 seconds again. i don't know which OS you're using, but on windows 7 it's noticeable as with aero style the window shadow gets darker and denser when one window lies above another and you see a short little blink on the screen when such a dialog pops up.
i didn't make it do to some screenshots when updating to r3613 because it came to my mind afterwardshappybut i'll remember the next time
[expired user #5249]'s profile image [expired user #5249] posted 13 years ago Permalink
ok, now i made it to do some screenshots and i even caught one with such a multiple dialog just popping upwinkwell, i relate to my bug report above...its your turn :)

http://tinyurl.com/32q66uq
ansgar's profile image ansgar posted 13 years ago Permalink
Thanks. There is obviously something wrong with sending WM_CLOSE to the main application. Only strange I never saw this as I am using the updater too.

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