Skip to content

Commit 5978e16

Browse files
authored
Merge pull request #489 from erizocosmico/fix/squash-exchange
vendor: upgrade go-mysql-server
2 parents 8161618 + 078a156 commit 5978e16

25 files changed

+396
-193
lines changed

Gopkg.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[[constraint]]
22
name = "gopkg.in/src-d/go-mysql-server.v0"
3-
revision = "255f4a35c69f573b6b19d73f03dd7265961dcba3"
3+
revision = "95285948912f7edaf92e2e66e44fa6c6ad509942"
44

55
[[constraint]]
66
name = "github.com/jessevdk/go-flags"

docs/using-gitbase/functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ To make some common tasks easier for the user, there are some functions to inter
1717

1818
## Standard functions
1919

20-
You can check standard functions in [`go-mysql-server` documentation](https://github.com/src-d/go-mysql-server/tree/255f4a35c69f573b6b19d73f03dd7265961dcba3#custom-functions).
20+
You can check standard functions in [`go-mysql-server` documentation](https://github.com/src-d/go-mysql-server/tree/95285948912f7edaf92e2e66e44fa6c6ad509942#custom-functions).

docs/using-gitbase/indexes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Note that you can create an index either **on one or more columns** or **on a si
1010

1111
You can find some more examples in the [examples](./examples.md#create-an-index-for-columns-on-a-table) section.
1212

13-
See [go-mysql-server](https://github.com/src-d/go-mysql-server/tree/255f4a35c69f573b6b19d73f03dd7265961dcba3#indexes) documentation for more details
13+
See [go-mysql-server](https://github.com/src-d/go-mysql-server/tree/95285948912f7edaf92e2e66e44fa6c6ad509942#indexes) documentation for more details
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
## Supported syntax
22

3-
To see the SQL subset currently supported take a look at [this list](https://github.com/src-d/go-mysql-server/blob/255f4a35c69f573b6b19d73f03dd7265961dcba3/SUPPORTED.md) from [src-d/go-mysql-server](https://github.com/src-d/go-mysql-server).
3+
To see the SQL subset currently supported take a look at [this list](https://github.com/src-d/go-mysql-server/blob/95285948912f7edaf92e2e66e44fa6c6ad509942/SUPPORTED.md) from [src-d/go-mysql-server](https://github.com/src-d/go-mysql-server).

internal/rule/squashjoins_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func TestAnalyzeSquashJoinsExchange(t *testing.T) {
2323
WithParallelism(2).
2424
AddPostAnalyzeRule(SquashJoinsRule, SquashJoins).
2525
Build()
26-
a.Batches = a.Batches[:len(a.Batches)-1] // remove the track_process rule
26+
a.Batches[len(a.Batches)-1].Rules = a.Batches[len(a.Batches)-1].Rules[1:]
2727
a.CurrentDatabase = "foo"
2828
ctx := sql.NewEmptyContext()
2929

@@ -33,14 +33,14 @@ func TestAnalyzeSquashJoinsExchange(t *testing.T) {
3333
result, err := a.Analyze(ctx, node)
3434
require.NoError(err)
3535

36-
project, ok := result.(*plan.Project)
36+
exchange, ok := result.(*plan.Exchange)
3737
require.True(ok)
38+
require.Equal(2, exchange.Parallelism)
3839

39-
exchange, ok := project.Child.(*plan.Exchange)
40+
project, ok := exchange.Child.(*plan.Project)
4041
require.True(ok)
41-
require.Equal(2, exchange.Parallelism)
4242

43-
rt, ok := exchange.Child.(*plan.ResolvedTable)
43+
rt, ok := project.Child.(*plan.ResolvedTable)
4444
require.True(ok)
4545

4646
_, ok = rt.Table.(*gitbase.SquashedTable)

session.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ func connectToBblfsh(endpoint string) (*bblfsh.Client, error) {
241241
// NewSessionBuilder creates a SessionBuilder with the given Repository Pool.
242242
func NewSessionBuilder(pool *RepositoryPool, opts ...SessionOption) server.SessionBuilder {
243243
return func(c *mysql.Conn, host string) sql.Session {
244-
opts = append(opts, WithBaseSession(sql.NewSession(host, c.User)))
244+
opts = append(opts, WithBaseSession(sql.NewSession(host, c.User, c.ConnectionID)))
245245
return NewSession(pool, opts...)
246246
}
247247
}

vendor/gopkg.in/src-d/go-mysql-server.v0/engine.go

Lines changed: 19 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/gopkg.in/src-d/go-mysql-server.v0/engine_test.go

Lines changed: 57 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)