HeidiSQL hangs when importing

[expired user #4614]'s profile image [expired user #4614] posted 12 years ago in Import/Export Permalink
Hi,
I've upgraded to the latest version.

I can see that there is a new interface for importing files (that dialog).
It looks good.

The problem is that when I try to import some large file (45MB) and
select "Run file directly", HeidiSQL hangs when it is in about 10-15MB.
Then I don't see any progress till the end.

Any idea? This used to work before (I had some 5 months old release)

Thanks
ansgar's profile image ansgar posted 12 years ago Permalink
Without more details I can't give you a valid answer. What query was running when it looked like it stands still?
[expired user #4614]'s profile image [expired user #4614] posted 12 years ago Permalink
I will gladly help you to solve this ;)

I use exports from phpMyAdmin, with extended syntax
INSERT INTO tbl_name (col_A,col_B) VALUES (1,2,3), (4,5,6), (7,8,9)

The file has about 200 000 records, 50 000 each "insert"

this is how it look like
CREATE TABLE IF NOT EXISTS `my_db` (
`ip` varchar(16) NOT NULL DEFAULT '',
`date` date NOT NULL DEFAULT '0000-00-00',
`user` tinytext NOT NULL,
`text1` text NOT NULL,
`text2` text,
`hash` varchar(32) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT IGNORE INTO `my_db` (`ip`, `date`, `user`, `text1`, `text2`, `hash`) VALUES
('0.0.0.0', '0000-00-00', 'user xxx', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'),
('0.0.0.0', '0000-00-00', 'user xxx', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'),
...


Hope it will helpsmile
ansgar's profile image ansgar posted 12 years ago Permalink
Hm, well looks very normal. Thinking Heidi needs some time to find the right query-end locations in your file, which can take quite a lot of CPU cycles.
[expired user #4614]'s profile image [expired user #4614] posted 12 years ago Permalink
I downloaded version 5.1 and the same file works fine there ... there must be some extra code happy
[expired user #6199]'s profile image [expired user #6199] posted 12 years ago Permalink
I have the same problem for several of the nightly builds. The problem does not occure in the 6.0.0.3603 build. Actually it's problem reoccuring from the pre 6.0 versions.
The dialog of the import progress and the sql both do not update on screen. On the background the import howover does progress. If you wait long enough it will complete.

If have these problems on big databases only. I have one of 350 mb and on of 2GB in both cases the progress is gone.
I use windows 7 even windows detects the program as not responding. It seems there is something wrong with the threads an undating the main thread. Perhaps some of the messages get out of sync between the threads.

The MAX_ALLOW_PACKET size on my database is 32M. So the export creates long insert ignore into..... lines.

But I don't think it's this that causes the problem, eventought thats what i suspected before. It could be however that it contributes. It looks like after finishing the first 5MB the application screen update fails.
[expired user #6249]'s profile image [expired user #6249] posted 12 years ago Permalink
I just test the version 7.0 of HeidiSQL and I have the same problem. I returned to version 6.0 and all goes well.
[expired user #6352]'s profile image [expired user #6352] posted 12 years ago Permalink
I'm also noticing this issue, well always had it, but it's really frusstrating that it hasn't been fixed yet.

I'm running 7.0.0.40.53

"Run SQL file" window doesn't respond, background (main) windows faded, frozen. Not getting any response for like minutes now. I just checked via mysqlworkbench, the data is flowing into the remote database, so it works, but the interface is frozen :(

The imported sql file is 350MB, loaded from file, not into memory.

Oh and how come I can't load the whole file into memory if I do have more than 2GB free? It always says "out of memory" after 1-2 seconds. Is this a bug, or a simple error message because we can't configure the max memory usage?
ansgar's profile image ansgar posted 12 years ago Permalink
Don't expect memory usage as high as the size of your file. Indeed memory usage is mostly much higher than the filesize, as there is logic around it, probably some objects holding parts of the file in memory. However, the dialog should get to the end at some point, the fact that the dialog does not respond only tells that it's busy importing the file.
[expired user #6352]'s profile image [expired user #6352] posted 12 years ago Permalink
Morning! :)

Well, I let my pc run whole night, and it still stands still at that "frozen" state, so if I can guess 6-7 hours should be enough for a smallish 350MB sql file processing :D

Also as I stated above, it worked like this for years now (I've been using Heidi for ~2 years now) so this isn't really a new issue.
[expired user #6252]'s profile image [expired user #6252] posted 12 years ago Permalink
I upgraded to version 7 and I also have this problem.
hakiru's profile image hakiru posted 12 years ago Permalink
I don't know if this will help, but (as I have the same problem) I put my bugreport:


date/time : 2012-04-29, 18:52:59, 490ms
computer name : TOMI-PC
user name : Tomi <admin>
registered owner : Tomi
operating system : Windows 7 Tablet PC x64 Service Pack 1 build 7601
system language : Polish
system up time : 1 day 5 hours
program up time : 5 minutes 9 seconds
processors : 8x Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz
physical memory : 1677/12278 MB (free/total)
free disk space : (C:) 17,88 GB (D:) 9,80 GB
display mode : 1280x1024, 32 bit
process id : $170c
allocated memory : 47,39 MB
executable : heidisql.exe
exec. date/time : 2012-04-26 10:28
version : 7.0.0.4133
compiled with : Delphi XE
madExcept version : 3.0m beta 1
callstack crc : $a306b60b, $28efef20, $28efef20
exception number : 1
exception class : EAccessViolation
exception message : Access violation at address 5B48083B in module 'libmysql.dll'. Read of address 00000358.

thread $2b94 (TQueryThread):
5b48083b libmysql.dll mysql_send_query
5b4808c0 libmysql.dll mysql_real_query
0070c101 heidisql.exe dbconnection 1370 +20 TMySQLConnection.Query
0067af4c heidisql.exe helpers 2659 +41 TQueryThread.Execute
004605af heidisql.exe madExcept HookedTThreadExecute
004a8d4e heidisql.exe Classes ThreadProc
00407358 heidisql.exe System 549 +0 ThreadWrapper
00460491 heidisql.exe madExcept CallThreadProcSafe
004604fb heidisql.exe madExcept ThreadExceptFrame
75163398 kernel32.dll BaseThreadInitThunk
>> created by main thread ($1c08) at:
0067ac82 heidisql.exe helpers 2593 +1 TQueryThread.Create

main thread ($1c08):
00000000 heidisql.exe madStackTrace +0 StackAddrToStr
>> stack will be calculated soon
hakiru's profile image hakiru posted 12 years ago Permalink
>> created by main thread ($1c08) at:
0067ac82 heidisql.exe helpers      2593  +1 TQueryThread.Create
main thread ($1c08):
00000000 heidisql.exe madStackTrace +0 StackAddrToStr
>> stack will be calculated soon
hakiru's profile image hakiru posted 12 years ago Permalink
BTW. source code should not be parsed for emotes on this forum, so it seems to me ;)
[expired user #6252]'s profile image [expired user #6252] posted 11 years ago Permalink
1 year on and this bug is still present... :(

Please fix.
[expired user #6671]'s profile image [expired user #6671] posted 11 years ago Permalink
Yesterday, Anse solve a bug related with disconnections. Maybe, the replacement of the libmysql.dll solve this issue as well!
[expired user #6252]'s profile image [expired user #6252] posted 11 years ago Permalink
Ooo, finger's crossed.

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