Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Support SHOW SCHEMAS (upgrade vitess to v1.6.0) #696

Merged
merged 1 commit into from
Apr 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions _scripts/go-vitess/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# go-vitess [![GoDoc](https://godoc.org/gopkg.in/src-d/go-vitess.v1?status.svg)](https://godoc.org/gopkg.in/src-d/go-vitess.v1)

`go-vitess` is an automatic filter-branch done by an [script](https://github.com/src-d/go-mysql-server/blob/master/_scripts/go-vitess/Makefile), of the great [Vitess](github.com/vitessio/vitess) project.
`go-vitess` is an automatic filter-branch done by an [script](https://github.com/src-d/go-mysql-server/blob/master/_scripts/go-vitess/Makefile), of the great [Vitess](https://github.com/vitessio/vitess) project.

The goal is keeping the `vitess.io/vitess/go` package and all the dependent packages as a standalone versioned golang library, to be used by other projects.

Expand All @@ -14,7 +14,7 @@ go get -v -u gopkg.in/src-d/go-vitess.v1/...

## Contributions

Since the code belongs to the upstream of [Vitess](github.com/vitessio/vitess),
Since the code belongs to the upstream of [Vitess](https://github.com/vitessio/vitess),
the issue neither pull requests aren't accepted to this repository.

## License
Expand Down
4 changes: 4 additions & 0 deletions engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,10 @@ var queries = []struct {
`SHOW DATABASES`,
[]sql.Row{{"mydb"}, {"foo"}},
},
{
`SHOW SCHEMAS`,
[]sql.Row{{"mydb"}, {"foo"}},
},
{
`SELECT SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA`,
[]sql.Row{
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ require (
golang.org/x/net v0.0.0-20190227022144-312bce6e941f // indirect
google.golang.org/grpc v1.19.0 // indirect
gopkg.in/src-d/go-errors.v1 v1.0.0
gopkg.in/src-d/go-vitess.v1 v1.5.0
gopkg.in/src-d/go-vitess.v1 v1.6.0
gopkg.in/yaml.v2 v2.2.2
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/src-d/go-errors.v1 v1.0.0 h1:cooGdZnCjYbeS1zb1s6pVAAimTdKceRrpn7aKOnNIfc=
gopkg.in/src-d/go-errors.v1 v1.0.0/go.mod h1:q1cBlomlw2FnDBDNGlnh6X0jPihy+QxZfMMNxPCbdYg=
gopkg.in/src-d/go-vitess.v1 v1.5.0 h1:oOjzjcSli51TD44fXlJx4S/TZmE8kiNgZUgCuw5B4DU=
gopkg.in/src-d/go-vitess.v1 v1.5.0/go.mod h1:+g/wDtovsUgE2ioi32fo5Vavrtvfd/N1AvnknTmTvZE=
gopkg.in/src-d/go-vitess.v1 v1.6.0 h1:jIe2MXLIewejW6sebf7IPnSzwt4fPQIj53nPuzg/xD8=
gopkg.in/src-d/go-vitess.v1 v1.6.0/go.mod h1:+g/wDtovsUgE2ioi32fo5Vavrtvfd/N1AvnknTmTvZE=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
Expand Down
2 changes: 1 addition & 1 deletion sql/parse/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func convertShow(s *sqlparser.Show, query string) (sql.Node, error) {
}

return node, nil
case sqlparser.KeywordString(sqlparser.DATABASES):
case sqlparser.KeywordString(sqlparser.DATABASES), sqlparser.KeywordString(sqlparser.SCHEMAS):
return plan.NewShowDatabases(), nil
case sqlparser.KeywordString(sqlparser.FIELDS), sqlparser.KeywordString(sqlparser.COLUMNS):
// TODO(erizocosmico): vitess parser does not support EXTENDED.
Expand Down