Bug #97416 EXPLAIN ANALYZE shows syntax error in SQL editor
Submitted: 29 Oct 2019 13:08 Modified: 14 Jan 2020 7:30
Reporter: Georgi Sotirov Email Updates:
Status: Closed Impact on me:
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:8.0.18 OS:Windows
Assigned to: CPU Architecture:x86

[29 Oct 2019 13:08] Georgi Sotirov
A statement prefixed with EXPLAIN ANALYZE shows syntax error in Workbench's SQL editor although the statement is executed without a problem.

How to repeat:
1. Paste the following statement into SQL editor:


2. EXPLAIN keyword is highlighted with red curved underline and moving the mouse over it shows: "EXPLAIN" is not valid at this position for this server version, expecting: HELP, DESC, USE, RESTART

Suggested fix:
No syntax error on EXPLAIN ANALYZE.
[29 Oct 2019 13:09] Georgi Sotirov
Screenshot with the error on EXPLAIN ANALYZE

Attachment: wb_explain_analyze_err.png (image/png, text), 6.95 KiB.

[29 Oct 2019 13:17] MySQL Verification Team
Hello Georgi Sotirov,

Thank you for the report and feedback.

[30 Oct 2019 14:47] Christine Cole
Posted by developer:
Fixed as of the upcoming MySQL Workbench 8.0.19 release, and here's the changelog entry:

The SQL editor applied syntax-error highlighting to the EXPLAIN keyword in
a valid statement prefixed with EXPLAIN ANALYZE, but the statement
executed as expected.

Thank you for the bug report.
[14 Jan 2020 7:30] Georgi Sotirov
Verified fixed in Workbench 8.0.19 released yesterday.
[11 Jul 2021 20:42] Runfeng Li
Using mysql workbench 8.0.25 on mac, the same syntax error happens again.
[12 Jul 2021 4:23] Runfeng Li
Never mind! We just noticed that we were using 5.7. After changing to 8.0, the command is working now.