Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL parser incorrectly evaluates SQL syntax within comment blocks #963

Open
JavMB opened this issue Mar 5, 2025 · 0 comments
Open

MySQL parser incorrectly evaluates SQL syntax within comment blocks #963

JavMB opened this issue Mar 5, 2025 · 0 comments
Assignees

Comments

@JavMB
Copy link

JavMB commented Mar 5, 2025

Description

When executing SQL queries in the file, the parser is checking the syntax of code within comment blocks (/* */), which should be completely ignored. This is causing syntax errors for commented-out code.

Steps to Reproduce

  1. Create a SQL file with commented blocks using /* */ syntax
  2. Include SQL code with potential syntax issues inside the comment blocks
  3. Execute the file against the MySQL server

Current Behavior

The MySQL parser reports syntax errors for code inside comment blocks, as seen in the error messages:

Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/* SELECT CONCAT_WS("","Querido",nombre,apellido,"su cumpleanos fue el dia",DA' at line 5

Expected Behavior

The parser should completely ignore any code within comment blocks (/* */) and not perform syntax checking on it.

Environment

  • MySQL version: [8.0.41]
  • Client/interface: [Antares]
  • OS: [Ubuntu]

Additional Context

The commented code contains Spanish text with special characters, which might be related to the issue. The parser seems to be incorrectly handling the comment boundaries when certain SQL functions with special characters are present.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants