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

Unexpected token. (near ;) #18487

Closed
liviuconcioiu opened this issue Jun 7, 2023 · 5 comments
Closed

Unexpected token. (near ;) #18487

liviuconcioiu opened this issue Jun 7, 2023 · 5 comments
Assignees
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Milestone

Comments

@liviuconcioiu
Copy link
Contributor

liviuconcioiu commented Jun 7, 2023

Describe the bug

Something has changed in the past weeks that is causing a Unexpected token. (near ;) error on phpMyAdmin 5.2.2-dev and 6.0.0-dev for every query that is edited and has ; at the end, no matter what you type.

Strange, it doesn't happen on the demo server.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://www.phpmyadmin.net/downloads/
  2. Download phpMyAdmin 5.2+snapshot
  3. Edit a query with ; at the end
  4. See error

Expected behavior

No Unexpected token. (near ;) error should be given.

Screenshots

07.06.2023_13.03.22_REC.mp4

Server configuration

  • phpMyAdmin version: 5.2.2-dev, 6.0.0-dev
@williamdes williamdes added Bug A problem or regression with an existing feature question Used when we need feedback from the submitter or when the issue is a question about PMA labels Jun 7, 2023
@williamdes
Copy link
Member

Can you confirm what snapshot you are using ?
We just released 5.8.0 (#449)

@liviuconcioiu
Copy link
Contributor Author

Latest versions, from yesterday, with 5.8.0.

@williamdes
Copy link
Member

Seems not to be in the parser, let's move it to phpMyAdmin main

$ echo 'SELECT * FROM `actor`' | ./bin/lint-query 
$ echo 'SELECT * FROM `actor` ORDER BY `actor_id` ASC' | ./bin/lint-query 
$ echo 'SELECT * FROM `actor` ORDER BY `actor_id` ASC;' | ./bin/lint-query 
$ echo 'SELECT * FROM `actor` ORDER BY `actor_id` ASC;' | ./bin/highlight-query 
SELECT
    *
FROM
    `actor`
ORDER BY

@williamdes williamdes transferred this issue from phpmyadmin/sql-parser Jun 7, 2023
@williamdes williamdes added affects/5.2 This issue or pull-request affects 5.2.x releases (and maybe further versions) affects/6.0 This issue or pull-request affects 6.0.x releases (and maybe further versions) and removed question Used when we need feedback from the submitter or when the issue is a question about PMA labels Jun 7, 2023
@williamdes williamdes added this to the 5.2.2 milestone Jun 7, 2023
@kamil-tekiela
Copy link
Contributor

kamil-tekiela commented Jun 7, 2023

It's caused by this commit 99881de but I don't know why and also don't know why this change was introduced.

It still happens on 6.0 but the errors from Linter aren't always showing up on the UI.

@williamdes
Copy link
Member

Oh!
Thanks for the hint, it's probably missing a condition
It's the lint route for procedures and functions :/

@williamdes williamdes added confirmed/5.2 This issue is confirmed to be reproduced on 5.2 at the time this label was set confirmed/6.0 This issue is confirmed to be reproduced on 6.0 at the time this label was set labels Jun 8, 2023
@williamdes williamdes self-assigned this Apr 28, 2024
@williamdes williamdes added has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete and removed affects/5.2 This issue or pull-request affects 5.2.x releases (and maybe further versions) affects/6.0 This issue or pull-request affects 6.0.x releases (and maybe further versions) confirmed/5.2 This issue is confirmed to be reproduced on 5.2 at the time this label was set confirmed/6.0 This issue is confirmed to be reproduced on 6.0 at the time this label was set labels Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
None yet
Development

No branches or pull requests

3 participants