Skip to content

SELECT query with LIMIT clause but no WHERE clause fails to parse. #67

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

Closed
ivanceras opened this issue May 17, 2019 · 5 comments · Fixed by #68
Closed

SELECT query with LIMIT clause but no WHERE clause fails to parse. #67

ivanceras opened this issue May 17, 2019 · 5 comments · Fixed by #68

Comments

@ivanceras
Copy link
Contributor

This passes

SELECT id, fname, lname FROM customer WHERE 1 = 1 LIMIT 5

But this one fails:

SELECT id, fname, lname FROM customer LIMIT 5
@ivanceras
Copy link
Contributor Author

It looks like limit keyword is interpreted as table alias since this invalid query parses.

SELECT id, fname, lname FROM customer LIMIT LIMIT 5

However, adding LIMIT to the reserved for table alias did NOT fix the issue.

@ivanceras
Copy link
Contributor Author

ivanceras commented May 18, 2019

Turns out I'm using and testing an older version of the code.
Well, so much for rubberducking. :)

No wait, It was actually the adding the LIMIT clause that fixed it, but had a typo in the test.
Aarggh!..

@dvaldivia
Copy link

Will this fix be released soon?

@benesch
Copy link
Contributor

benesch commented Jun 17, 2019

Hi @dvaldivia, I'm afraid I don't have a concrete answer for you, but there is a general sense that it's time for a new release soon (some details). I'll launch a new issue so we have somewhere to centralize this discussion.

@benesch
Copy link
Contributor

benesch commented Jun 17, 2019

Ok, I've filed https://github.com/andygrove/sqlparser-rs/issues/117 to continue the discussion.

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

Successfully merging a pull request may close this issue.

3 participants