kpeters58 posted 8 months ago in General

the latest (8 3 0 4766) version seems to have issues with comments (--) in the query window:

If you have 2 'commands' in a query window and one of them is commented out (and the comment -- is not separated from the command by at least one space) it is shown as commented (grayed out), yet it is still being executed

ansgar posted 8 months ago
The underlying SynEdit highlighter has a small gitch here. Two dashes must be followed by a space in order to be a comment: "-- ". If there is no space, then it's not a comment, and MySQL takes it as part of the query.

SynEdit, however, displays also two dashes without the following space as comments. This is an error I've ever wanted to submit to their bugtracker. I'll see if it probably was reported before.
ansgar posted 8 months ago
Oh, I have already filed it as a bugreport, 4 years ago...

kalvaro posted 7 months ago
Most likely SynEdit treats SQL as a single language and that's a valid comment in all other dialects (including standard SQL).
ansgar posted 7 months ago
Perhaps I can finally fix that. The SynEdit project unfortunately does not seem very active. I wonder why that's the case, as quite a few applications use the SynEdit highlighter.

ansgar posted 6 months ago
I think I got it, in r4790.
Oblepihus posted 6 months ago

I'm using HeidiSQL with MSSQL Server and for me there could be no spaces and the string would be still commented.

Maybe it's possible to check which server we're connected to and then use different highlight?

Thank you!
ansgar posted 6 months ago
Indeed. I thought MSSQL would behave differently. I guess it's required to make a server/version conditional again here. Sigh.

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