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

"enclosed by" is not recognized by the SQL parser #236

Closed
svaningelgem opened this issue Mar 20, 2019 · 5 comments
Closed

"enclosed by" is not recognized by the SQL parser #236

svaningelgem opened this issue Mar 20, 2019 · 5 comments
Assignees
Labels
Milestone

Comments

@svaningelgem
Copy link

svaningelgem commented Mar 20, 2019

Describe the bug

"enclosed by" is not recognized by the SQL parser

To Reproduce

Steps to reproduce the behavior:

  1. Go to SQL window
  2. Type for example:
SELECT a
into outfile '/tmp/temp.data' 
fields terminated by ',' enclosed by '"'
FROM sometable
  1. no need to run it (but when you run it against an actual table, it works just fine on the MySQL server)
  2. See error

Expected behavior

No error (no red cross at the left side)

Observed behaviour

Red cross at the left + these messages:

  • Unrecognised keyword. (near enclosed by)
  • Unexpected token. (near '"')
@apoorvkhare07
Copy link

@williamdes @svaningelgem I think this issue should be added in sql-parser repository as this issue is with the parser.
The solution is adding parsing for these unimplemented options.
Should I work on this one?

@williamdes
Copy link
Member

cc @devenbansod ?

@ibennetch
Copy link
Member

I agree, moving to sql-parser repository.

You may work on it if you'd like.

@svaningelgem thank you for the report.

@ibennetch ibennetch transferred this issue from phpmyadmin/phpmyadmin Mar 30, 2019
@williamdes
Copy link
Member

echo "SELECT a into outfile '/tmp/temp.data'  fields terminated by ',' enclosed by '\"' FROM sometable" | ./bin/lint-query 
#1: Unrecognized keyword. (near "enclosed by" at position 65)
#2: Unexpected token. (near "'"'" at position 77)

@williamdes williamdes self-assigned this Apr 21, 2023
@williamdes
Copy link
Member

Okay, the bug in the code is about the casing of fields, use uppercase and it will be happy

@williamdes williamdes added this to the 5.8.0 milestone Apr 21, 2023
williamdes added a commit that referenced this issue Apr 21, 2023
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Apr 21, 2023
Signed-off-by: William Desportes <williamdes@wdes.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants