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

"SELECT A[A'']" #1941

Closed
tbg opened this issue Aug 4, 2015 · 4 comments
Closed

"SELECT A[A'']" #1941

tbg opened this issue Aug 4, 2015 · 4 comments
Assignees

Comments

@tbg
Copy link
Member

tbg commented Aug 4, 2015

AST here:
https://gist.github.com/tschottdorf/d3495597e36581d621bd

reproduces as

"SELECT A%!s(PANIC=runtime error: invalid memory address or nil pointer dereference)"

go-fuzz.

@tbg
Copy link
Member Author

tbg commented Aug 4, 2015

this is probably the ArrayIndirection being buggy.

@petermattis
Copy link
Collaborator

Yeah. I'll fix.

@petermattis
Copy link
Collaborator

What's the failing query? I've tried SELECT A[A] and SELECT A[A"]. The former parses while the latter hits a syntax error due to an unterminated string. Ah, never mind, it's: SELECT A[A'']. That double single-quote looks like a double-quote.

@petermattis
Copy link
Collaborator

The base problem is that A'' is parsed as a valid expression for which there is non semantic action. Still trying to figure out why that's a valid expression.

petermattis added a commit that referenced this issue Aug 4, 2015
The syntax is "<ident> <string>" where <ident> is a simple type name. So
you can do stuff like "int '123'". This can also be accomplished via the
CAST syntax.

Fixes #1941
@petermattis petermattis self-assigned this Aug 4, 2015
@petermattis petermattis removed the PTAL label Aug 4, 2015
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