Skip to content

Commit

Permalink
Bump the yacc pointer.
Browse files Browse the repository at this point in the history
Use the newer yacc to re-generate the sql grammar.

Fixes #1801.
  • Loading branch information
petermattis committed Jul 24, 2015
1 parent 6734f42 commit 8bfe748
Show file tree
Hide file tree
Showing 4 changed files with 1,244 additions and 1,308 deletions.
2 changes: 1 addition & 1 deletion GLOCKFILE
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ github.com/cockroachdb/c-lz4 6e71f140a365017bbe0904710007f8725fd3f809
github.com/cockroachdb/c-protobuf 0f9ab7b988ca7474cf76b9a961ab03c0552abcb3
github.com/cockroachdb/c-rocksdb e120ce0fb32f86b94188928743270ea11ff016b3
github.com/cockroachdb/c-snappy 618733f9e5bab8463b9049117a335a7a1bfc9fd5
github.com/cockroachdb/yacc 89870eb191e82216b51d2b03ee94224542f6eebc
github.com/cockroachdb/yacc 572e006f8e6b0061ebda949d13744f5108389514
github.com/coreos/etcd 3e455ed1049ab4a6152d8df32e58f014abafbc7f
github.com/docker/docker 7571e6d90083f619f5068a1dddc6d9835201f908
github.com/elazarl/go-bindata-assetfs 3dcc96556217539f50599357fb481ac0dc7439b9
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ check:
grep -vE '(declaration of err shadows|^vet: cannot process directory \.git)'
@echo "golint"
@! golint $(PKG) | \
grep -vE '(\.pb\.go|embedded\.go|_string\.go|LastInsertId|sql\.y)' \
grep -vE '(\.pb\.go|embedded\.go|_string\.go|LastInsertId|sql/parser/(yaccpar|sql\.y):)' \
# https://golang.org/pkg/database/sql/driver/#Result :(
@echo "gofmt (simplify)"
@! gofmt -s -l . 2>&1 | grep -vE '^\.git/'
Expand Down
11 changes: 7 additions & 4 deletions sql/parser/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package parser
import (
"testing"

"github.com/cockroachdb/cockroach/testutils"
_ "github.com/cockroachdb/cockroach/util/log" // for flags
)

Expand Down Expand Up @@ -363,8 +364,7 @@ CREATE TABLE test (
}

func TestParsePanic(t *testing.T) {
// TODO(tschottdorf): see #1801; when fixed, remove this and next line.
t.Skip()
// Replicates #1801.
defer func() {
if r := recover(); r != nil {
t.Fatal(r)
Expand All @@ -381,6 +381,9 @@ func TestParsePanic(t *testing.T) {
"(F(F(F(F(F(F(F(F(F(F" +
"(F(F(F(F(F(F(F(F(F((" +
"F(0"

_, _ = Parse(s)
_, err := Parse(s)
expected := `syntax error at or near "EOF"`
if !testutils.IsError(err, expected) {
t.Fatalf("expected %s, but found %v", expected, err)
}
}
Loading

0 comments on commit 8bfe748

Please sign in to comment.