table color in sql edit.

[expired user #8339]'s profile image [expired user #8339] posted 9 years ago in General Permalink
find bug.
if bd consist over 2400 tables color of table in sql edit is wrong.
in first sreenshot right color.
in second sreenshot wrong color.
2 attachment(s):
  • -17
  • -16
[expired user #8339]'s profile image [expired user #8339] posted 9 years ago Permalink
may be problem in source code?:
procedure TMainForm.SaveListSetup( List: TVirtualStringTree );
var
i : Byte;
[expired user #8339]'s profile image [expired user #8339] posted 9 years ago Permalink
i changed the type 'byte' to 'integer'. After compile heidisql the bug didn't fixed.
the problem is something else.
ansgar's profile image ansgar posted 9 years ago Permalink
This is intentionally, not a bug. In earlier versions, HeidiSQL highlighted all available tables, which took too long on very large databases. So, I restricted that to 1000 if I recall right.
ansgar's profile image ansgar posted 9 years ago Permalink
See this thread.
[expired user #8339]'s profile image [expired user #8339] posted 9 years ago Permalink
How this parameter change to 3000 tables?
ansgar's profile image ansgar posted 9 years ago Permalink
This is not a parameter but hardcoded in HeidiSQL. I could make it a setting for tools > Preferences, so the user is responsible for the crash it may cause.
[expired user #8339]'s profile image [expired user #8339] posted 9 years ago Permalink
please make this parameter.
[expired user #8339]'s profile image [expired user #8339] posted 9 years ago Permalink
when a parameter will be added?
ansgar's profile image ansgar posted 9 years ago Permalink
I should probably update the SynEdit component code in HeidiSQL, hoping that this fixes the crash, so we can remove that limitation entirely. Will check that.
[expired user #8339]'s profile image [expired user #8339] posted 9 years ago Permalink

when the SynEdit component is updated?

ansgar's profile image ansgar posted 9 years ago Permalink

I already updated SynEdit in December, but there are already quite some new commits on its master branch.

[expired user #8339]'s profile image [expired user #8339] posted 9 years ago Permalink

I have read all the commits in December, but according to the annotations, the problem may be is still not solved.

ansgar's profile image ansgar posted 9 years ago Permalink

Just filed a bug report: https://github.com/SynEdit/SynEdit/issues/28

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

Lajos-Juhasz commented 6 days ago I noticed this bug yesterday. My solution was to build the list in the temporary stringlist and assign the complete list to the highlighter. Most probably the reason for the slowdown is the TSynSQLSyn.TableNamesChanged.

Maybe we should add BeginTableNamesUpdate/EndTableNameUpdates.

ansgar's profile image ansgar posted 8 years ago Permalink

I spent some time with debugging SynEdit. No luck. See my update in the ticket there. Hoping somebody can speed up the mentioned procedure.

ansgar's profile image ansgar posted 8 years ago Permalink

The SynEdit ticket was solved some hours ago!

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.

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

Thank you for your great work! I found a few bugs and remarks.

  1. there is no hightlight color name database.
  2. sometimes highlighted alias table.
  3. if there is a sql query field and the table with the same name, the table highlights the color name.
3 attachment(s):
  • -93
  • -94
  • -95
ansgar's profile image ansgar posted 8 years ago Permalink
  1. if there is a sql query field and the table with the same name, the table highlights the color name.

Well, the highlighter is limited and not quite clever. It cannot detect whether you mean a column name or a table name. The highlighter is not comparable to the complexity of a query parser.

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

current highlighting (not valid): ... join rnas rn where rn.rnas = ''

valid highlighting: .. join rnas rn where rn.rnas = ''

Because in this example: rn - alias rnas, rn.rnas - field of table (alias) rnas (rn).

ansgar's profile image ansgar posted 8 years ago Permalink

Yes, I already understood what you described. Only the highlighter is not capable to distinct between tables and columns. That's beyond what SynEdit does.

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