Bug #114009 '--' does not highlight as comment in SQL editor if following character is tab
Submitted: 15 Feb 2024 16:39 Modified: 16 Feb 2024 13:19
Reporter: Michael Beaton Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:8.0.36 OS:Any
Assigned to: CPU Architecture:Any

[15 Feb 2024 16:39] Michael Beaton
Description:
'--' followed by a space highlights as a comment in the SQL Editor.
'--' followed by a tab does not highlight as a comment, although it is one.

From a quick search in the MySQL Workbench code, some handlers for '--' treat '--' followed by space, tab, cr or lf as a comment, others treat '--' followed by space or any control character as a comment - i.e. I have not so far managed to identify the place in the code where this is mis-parsed.

However, both from the above and from what happens when you run it, '--' followed by a tab definitely is a comment, and should be highlighted as one in the editor.

This may be the same as https://bugs.mysql.com/bug.php?id=66873, which I believe was incorrectly closed - if so, it would be long-standing.

How to repeat:
As above, always occurs
[15 Feb 2024 16:41] Michael Beaton
Image showing the issue

Attachment: mysql-tab-comment.png (image/png, text), 20.80 KiB.

[16 Feb 2024 13:19] MySQL Verification Team
Hello Michael,

Thank you for the bug report.
Verified as described.

Regards,
Ashwini Patil