Program crashes with DB - 12000 Tables

[expired user #8331]'s profile image [expired user #8331] posted 10 years ago in General Permalink
Hello, I have a database with many tables ~12000,
When I try to open this DB (MySQL) Heidi crashes unhappy

Here is error report:

date/time : 2014-09-08, 14:33:42, 518ms
computer name : YJILKOV
user name : yjilkov <admin>
registered owner : Asen
operating system : Windows 7 x64 Service Pack 1 build 7601
system language : Bulgarian
system up time : 11 days 11 hours
program up time : 3 minutes 41 seconds
processors : 4x Intel(R) Core(TM) i5 CPU 650 @ 3.20GHz
physical memory : 3917/7989 MB (free/total)
free disk space : (C:) 17,38 GB
display mode : 1920x1080, 32 bit
process id : $15bc
allocated memory : 86,58 MB
largest free block : 8185,77 GB
executable : heidisql.exe
exec. date/time : 2014-09-08 14:29
version : 8.3.0.4815
compiled with : Delphi XE5
madExcept version : 4.0.8.1
callstack crc : $6aa13b63, $eb0cad7c, $eb0cad7c
exception number : 1
exception class : EStackOverflow
exception message : Stack overflow.

main thread ($1a8):
7fefd30a KERNELBASE.dll InternalLcidToName
7fefd302 KERNELBASE.dll CompareStringW
77094ee6 kernel32.dll CompareStringW
00473a74 heidisql.exe System.SysUtils WideCompareText
009039f0 heidisql.exe SynHighlighterHashEntries 200 +4 TSynHashEntry.AddEntry
00903a71 heidisql.exe SynHighlighterHashEntries 207 +11 TSynHashEntry.AddEntry
ansgar's profile image ansgar posted 10 years ago Permalink
I can try to fix that here. This crash seems to be happen when adding the 12000 table names into SynEdit's internal list. I guess you can live with it when Heidi does not highlight all of these 12000 table names in the editor, but let's say the first 1000 tables only.
[expired user #8331]'s profile image [expired user #8331] posted 10 years ago Permalink
Of course, i understand that this is not a usual problem but i like the program so much and i will be very glad if i could work with it with all my databases. smilesmilesmile
ansgar's profile image ansgar posted 10 years ago Permalink
I spent one hour to find the place where table names are being added to the highlighter, with no luck yet. Damn I was sure it was TSynSQLSyn.TableNames. Will keep looking.
[expired user #8331]'s profile image [expired user #8331] posted 10 years ago Permalink
Thank you!!!
Code modification/commit from ansgar.becker, 10 years ago, revision 8.3.0.4817
Fix EStackOverflow in TSynHashEntry.AddEntry when adding too many table names. See http://www.heidisql.com/forum.php?t=16307
ansgar's profile image ansgar posted 10 years ago Permalink
Fixed in r4817. Highlighter does no longer try to highlight tables when there are more than 1000.
[expired user #8331]'s profile image [expired user #8331] posted 10 years ago Permalink
YOU ARE THE BEST!!! I am gonna' try it out right away! :)
[expired user #8331]'s profile image [expired user #8331] posted 10 years ago Permalink
It works smile
[expired user #8510]'s profile image [expired user #8510] posted 9 years ago Permalink
Hi there,

I have the same probleme here.
900 tables and about 600 Triggers.
Is it possible to skip highlighting for triggers?
Is there any reason to highlight them?
Maybe you could higlight the first 1000 items, or may increase this number?
thank you
Code modification/commit 7d7b78f from ansgarbecker, 8 years ago, revision 9.3.0.5111
Merge latest changes from official SynEdit repository. Fixes slow highlighter when TableNames contains several 1000's of strings. Removes limitation to 1000 table names for highlighting. See
* http://www.heidisql.com/forum.php?t=16307
* https://github.com/SynEdit/SynEdit/issues/28
ansgar's profile image ansgar posted 8 years ago Permalink

The SynEdit guys fixed that slowness issue with many table names!

In my tests I simulated 50000 table names without a notifiable waiting time.

I merged the changes into HeidiSQL in r5111 so you can test yourself. I also removed the limitation to 1000 tables names now.

[expired user #8510]'s profile image [expired user #8510] posted 8 years ago Permalink

Highlighting works fine. Thank you

But, Everytime I try to do autocompletion using CTRL + SPACE Heidi executes an show create table for each table and a show create trigger too. in my case there are about 1600 show creates beeign executed.

ansgar's profile image ansgar posted 8 years ago Permalink

That has nothing to do with highlighting, does it?

Well, if you're on a newer MySQL server, these SHOW CREATE queries should be fired as one big multi-statement with semicolons between each single one, are they?

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