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

fix panic when dealing with empty sql ident #1808

Merged
merged 1 commit into from
Jul 25, 2015
Merged

Conversation

tbg
Copy link
Member

@tbg tbg commented Jul 25, 2015

another one for go-fuzz @dvyukov

@tbg tbg added the PTAL label Jul 25, 2015
@tamird
Copy link
Contributor

tamird commented Jul 25, 2015

LGTM

tbg added a commit that referenced this pull request Jul 25, 2015
fix panic when dealing with empty sql ident
@tbg tbg merged commit 408b4c3 into cockroachdb:master Jul 25, 2015
@tbg tbg deleted the ident_panic branch July 25, 2015 14:23
@tbg tbg removed the PTAL label Jul 25, 2015
@@ -30,6 +30,10 @@ func TestParse(t *testing.T) {
testData := []struct {
sql string
}{
// TODO(tschottdorf): shouldn't these below error?
{``},
{`VALUES ("")`},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VALUES is actually considered a type of "select statement". I don't know if this is ANSI SQL, but postgres allows it:

pmattis=# VALUES (1, 2);
 column1 | column2
---------+---------
       1 |       2
(1 row)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, good to know. I'll update the comments in a future commit.

@petermattis
Copy link
Collaborator

LGTM

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 this pull request may close these issues.

None yet

3 participants