Ads were blocked by your webbrowser.

This is not a problem, but keep in mind that developing HeidiSQL, user support and hosting takes time and money.

You may want to send a donation instead.

Comment lines in filter conditions

alex_monthy posted 5 days ago in Feature discussion

I just stumbled on a curious bug. I had a filter set for a table and a simple sort on one of the date columns in the table. But the sorting did not work. I then reviewed the filter which had a comment line (starting with a #) to allow for quick editing of some filter paramenters. So the filter condition read like

a or b
# not c

and the column to be sorted was represented by

sort by xyz

in the SQL statement. The statement as a whole then read like

select abc, def from xyz where a or b # not c sort by xyz

which of course rendered the sorting criteria inefficient. I doubt that I will stumble over this a 2nd time. But maybe the interface could check for this use case and issue a warning if there are comment lines in filters. Or insert a CRLF to the concatenation of filter and sort condition.

ansgar posted 5 days ago

Watch out for the query highlighting in the log panel. There is a line break, it is just not displayed in the log, intentionally, so it's always a single line for one command.

1 attachment(s):
  • filter-with-comment

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