Two issues during the multi sql file import.

Icos's profile image Icos posted 6 years ago in Import/Export Permalink

Hi, Ansgar!

I'm often using the Heidi to import several sql files into one database. Usually it's a lengthy process, due to the file sizes and i'm switching to another window, while Heidi does it's job.

And here comes the unpleasant part. Every time Heidi tries to import another file, it shows a message box with a progress indicator. And by some reason it also brings the Heidi on top after that. Since usually during the import i'm typing something or clicking in another window, abrupt switching to the Heidi's window often results in aborted import. Just before you are about to press enter or space Heidi pops on top and it's Abort button is focused, so you cancel the import unwillingly.

Another related problem, which is even worse, if you were clicking on the part of the screen, where the database tree is shown and Heidi pops on top, you end up selecting the different database in the database tree, Heidi executes the "use database name" command and switches the database, while data import is in the process and your data goes into not intended place.

So what i'm asking for is two things:

  1. Disable the popping on top of Heidi during the import entirely or have a setting for it.
  2. Disable the database tree during the import, to avoid the occasional switch to another database.

Hope this makes sense for you. And thanks for your great work as always!

Code modification/commit 845533f from Ansgar Becker <anse@heidisql.com>, 6 years ago, revision 9.5.0.5291
Don't steal focus from foreground application after importing SQL file. See https://www.heidisql.com/forum.php?t=25651
ansgar's profile image ansgar posted 6 years ago Permalink

I suppose it's the progress dialog which steals focus. I just removed a BringToFront command from the code, which was fired at the end of one file import. Please check if the next nightly build fixes that (first) issue.

Icos's profile image Icos posted 6 years ago Permalink

Tested it today multiple times (5291).

The problem is half fixed now. Heidi itself doesn't comes on top anymore. However, the message box with progress bar still comes on top after a few files were imported and then in a few seconds Heidi's main window appears under it as well.

I was able to reproduce this behavior while importing batches of 50+ files.

ansgar's profile image ansgar posted 6 years ago Permalink

Hm, there is no further call to BringToFront. Probably the additional SetFocus command does similar stuff. Not sure.

Icos's profile image Icos posted 6 years ago Permalink

I think, it's related to the actual MessageBox method you are using. If you'll replace it with a window and will not open/close it for each file, but rather open it once and change the window's content, the problem will be fixed.

ansgar's profile image ansgar posted 6 years ago Permalink

Maybe. But in that case I would prefer to reuse the dialog for multiple files, without removing it completely, as I find this is quite a nice thing.

Icos's profile image Icos posted 6 years ago Permalink

That would be great! I'll wait for the next build then.

Thank you very much for fixing this.

ansgar's profile image ansgar posted 6 years ago Permalink

Note that this is just a discussion forum. You can file an issue request in the bugtracker for that purpose.

Icos's profile image Icos posted 6 years ago Permalink

Should i do it now, or for this one, this thread is enough?

ansgar's profile image ansgar posted 6 years ago Permalink

That above mentioned reuse of the progress dialog is more complex to implement, so that should definitely go into a new issue on the tracker.

Icos's profile image Icos posted 6 years ago Permalink

Posted a new issue here: https://github.com/HeidiSQL/HeidiSQL/issues/338

Icos's profile image Icos posted 5 years ago Permalink

Well, two years have passed since my original post, so it's time to renew it. Ansgar, please fix problem, it still exists and is very annoying during the multiple file imports.

Icos's profile image Icos posted 5 years ago Permalink

Ansgar, please at least say that it's not important, you don't want to do it etc. Anything is better than ignoring.

ansgar's profile image ansgar posted 5 years ago Permalink

Not meant to have that ignored, there are just a few too many reports there. Will check that now.

Icos's profile image Icos posted 5 years ago Permalink

Thank you very much for the answer!

Icos's profile image Icos posted 5 years ago Permalink

Updated to the latest build and saw this issue fixed! Thank you very much, Ansgar!

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