Bug #114748 False Syntax Error
Submitted: 23 Apr 16:06 Modified: 25 Apr 12:16
Reporter: jeff robinson Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:8.0.36 OS:Windows (Microsoft Windows 11 Pro)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[23 Apr 16:06] jeff robinson
Description:
----[For better reports, please attach the log file after submitting. You can find it in C:\Users\jeff\AppData\Roaming\MySQL\Workbench\log\wb.log]

This SQL statement is fine:

select count(*) from 4yhistory where ticker='ENPH';

add the database name and an error is reported.

select count(*) from stocksdb.4yhistory where ticker='ENPH';

Any statement that includes <dbname>.<table> where table begins with a number causes the bug.

How to repeat:
Not relevant - just enter the statement to see the bug

This was an issue on 8.0.34 onwards, nit sure about earlier revs did not use them
[24 Apr 12:53] MySQL Verification Team
Hello Jeff Robinson,

Thank you for the bug report.
Could you please provide error details along with screenshot of the issue?

Regards,
Ashwini Patil
[24 Apr 13:12] jeff robinson
This SQL statement is fine (meaning no syntax error is flagged):
use stocksdb;
select count(*) from 4yhistory where ticker='ENPH';

add the database name and an error is reported (meaning a red cross appears at the start of line). The statement however executes without issue

select count(*) from stocksdb.4yhistory where ticker='ENPH';

Any statement that includes <dbname>.<table> where table begins with a
number causes the bug.
[25 Apr 12:06] MySQL Verification Team
Hello Jeff Robinson,

Thank you for the details.
Please try below SQL query. Enclose the table name with quotes(``)

select count(*) from stocksdb.`4yhistory` where ticker='ENPH';

Regards,
Ashwini Patil
[25 Apr 12:16] jeff robinson
It seems inconsistent that the table name alone does not require quotes, but database dot table name does require quotes. I would still call this a bug.