Bug #117774 INTERSECT operator used in conjunction with multiple VALUES clauses incorrectly parsed
Submitted: 23 Mar 2025 12:18 Modified: 24 Mar 2025 4:04
Reporter: sasha spielberg Email Updates:
Status: Won't Fix Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:8.0.41 OS:Windows (Microsoft Windows 10 Home)
Assigned to: CPU Architecture:x86
Tags: WBBugReporter

[23 Mar 2025 12:18] sasha spielberg
Description:
----[For better reports, please attach the log file after submitting. You can find it in C:\Users\gh\AppData\Roaming\MySQL\Workbench\log\wb.log]

Reproducibility: Always

Summary: The MySQL Workbench SQL Editor incorrectly flags the INTERSECT operator as an error when used in conjunction with the VALUES statement, even though this is a valid SQL construct according to the official MySQL Reference Manual. Specifically, when copying the example directly from Section 15.2.19 "VALUES Statement", the editor reports "INTERSECT" is not allowed at this position, expecting EOF or ';'.

How to repeat:

Copy the following SQL statement directly from the MySQL 8.4 Reference Manual, Section 15.2.19 (or type it in):

VALUES ROW(1,2), ROW(3,4), ROW(5,6) INTERSECT VALUES ROW(10,15), ROW(20,25), ROW(3,4);

Observe the syntax highlighting and error reporting in the SQL Editor.
Expected Behavior:

The SQL Editor should recognize the INTERSECT keyword as valid in this context and not report any syntax errors. The entire statement should be highlighted correctly according to MySQL syntax.

Actual Behavior:

The SQL Editor highlights INTERSECT with an error indicator (red underline) and displays an error message upon hovering or inspection, stating: "INTERSECT" is not allowed at this position, expecting EOF or ';'.

Additional Information:

The SQL statement itself is valid and executes correctly when run against a MySQL 8.4 server, demonstrating that the issue lies within the Workbench's SQL Editor parsing.
This issue occurs specifically with the INTERSECT operator used in conjunction with multiple VALUES clauses. Simple VALUES statements are correctly parsed.
[24 Mar 2025 4:04] MySQL Verification Team
Hello sasha spielberg,

Thank you for the report and feedback.

regards,
Umesh
[14 Sep 18:06] Omer Barnir
Posted by developer:

This issue applies to the legacy MySQL Workbench 8.x implementation that is no longer supported or maintained.
MySQL Workbench 26.7 is a complete rewrite using a new technology stack and does not use the affected legacy implementation.
Therefore, this issue is not applicable to the current MySQL Workbench product and as such is closed.