Skip to content

Commit 24b09dc

Browse files
authored
Merge pull request #781 from kuba--/fix-778
Upgrade mysql
2 parents 098c3af + 328d977 commit 24b09dc

File tree

18 files changed

+181
-110
lines changed

18 files changed

+181
-110
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 = "0093a7562ad1cf31f179396dfa5be32893059dbb"
3+
revision = "3dd441325d1731821eff0495fbf63747c258b8ff"
44

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

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ $(MAKEFILE):
1616

1717
-include $(MAKEFILE)
1818

19-
GO_BUILD_ARGS += -tags mysql_go_regex
2019

2120
upgrade:
2221
go run tools/rev-upgrade/main.go -p $(UPGRADE_PRJ) -r $(UPGRADE_REV)
@@ -36,7 +35,7 @@ static-build: VERSION ?= $(shell git describe --exact-match --tags 2>/dev/null |
3635
static-build: LD_FLAGS += -linkmode external -extldflags '-static -lz' -s -w
3736
static-build: GO_BUILD_PATH ?= github.com/src-d/gitbase/...
3837
static-build:
39-
go build -ldflags="$(LD_FLAGS)" -v -tags mysql_go_regex $(GO_BUILD_PATH)
38+
go build -ldflags="$(LD_FLAGS)" -v $(GO_BUILD_PATH)
4039

4140
ci-e2e: packages
4241
go test ./e2e -gitbase-version="$(TRAVIS_TAG)" \

docs/using-gitbase/functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ Also, if you want to retrieve values from a non common property, you can pass it
9595
9696
## Standard functions
9797

98-
You can check standard functions in [`go-mysql-server` documentation](https://github.com/src-d/go-mysql-server/tree/0093a7562ad1cf31f179396dfa5be32893059dbb#custom-functions).
98+
You can check standard functions in [`go-mysql-server` documentation](https://github.com/src-d/go-mysql-server/tree/3dd441325d1731821eff0495fbf63747c258b8ff#custom-functions).

docs/using-gitbase/indexes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ and for the second query also two indexes will be used and the result will be a
2626

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

29-
See [go-mysql-server](https://github.com/src-d/go-mysql-server/tree/0093a7562ad1cf31f179396dfa5be32893059dbb#indexes) documentation for more details
29+
See [go-mysql-server](https://github.com/src-d/go-mysql-server/tree/3dd441325d1731821eff0495fbf63747c258b8ff#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 clients
22

3-
To see the supported MySQL clients and examples about how to use them, take a look [here](https://github.com/src-d/go-mysql-server/blob/0093a7562ad1cf31f179396dfa5be32893059dbb/SUPPORTED_CLIENTS.md).
3+
To see the supported MySQL clients and examples about how to use them, take a look [here](https://github.com/src-d/go-mysql-server/blob/3dd441325d1731821eff0495fbf63747c258b8ff/SUPPORTED_CLIENTS.md).
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/0093a7562ad1cf31f179396dfa5be32893059dbb/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/3dd441325d1731821eff0495fbf63747c258b8ff/SUPPORTED.md) from [src-d/go-mysql-server](https://github.com/src-d/go-mysql-server).

integration_test.go

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ func TestIntegration(t *testing.T) {
5151
ON c.blob_hash = b.blob_hash
5252
GROUP BY c.commit_hash`,
5353
[]sql.Row{
54-
{int32(4), "1669dce138d9b841a518c64b10914d88f5e488ea"},
55-
{int32(3), "35e85108805c84807bc66a02d91535e1e24b38b9"},
56-
{int32(9), "6ecf0ef2c2dffb796033e5a02219af86ec6584e5"},
57-
{int32(8), "918c48b83bd081e863dbe1b80f8998f058cd8294"},
58-
{int32(3), "a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69"},
59-
{int32(6), "af2d6a6954d532f8ffb47615169c8fdf9d383a1a"},
60-
{int32(2), "b029517f6300c2da0f4b651b8642506cd6aaf45d"},
61-
{int32(3), "b8e471f58bcbca63b07bda20e428190409c2db47"},
54+
{int64(4), "1669dce138d9b841a518c64b10914d88f5e488ea"},
55+
{int64(3), "35e85108805c84807bc66a02d91535e1e24b38b9"},
56+
{int64(9), "6ecf0ef2c2dffb796033e5a02219af86ec6584e5"},
57+
{int64(8), "918c48b83bd081e863dbe1b80f8998f058cd8294"},
58+
{int64(3), "a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69"},
59+
{int64(6), "af2d6a6954d532f8ffb47615169c8fdf9d383a1a"},
60+
{int64(2), "b029517f6300c2da0f4b651b8642506cd6aaf45d"},
61+
{int64(3), "b8e471f58bcbca63b07bda20e428190409c2db47"},
6262
},
6363
},
6464
{
@@ -98,7 +98,7 @@ func TestIntegration(t *testing.T) {
9898
LIMIT 1
9999
) repo_years
100100
GROUP BY first_commit_year`,
101-
[]sql.Row{{int32(1), int32(2015)}},
101+
[]sql.Row{{int64(1), int32(2015)}},
102102
},
103103
{
104104
`SELECT COUNT(*) as num_commits, month, repo_id, committer_email
@@ -113,9 +113,9 @@ func TestIntegration(t *testing.T) {
113113
) as t
114114
GROUP BY committer_email, month, repo_id`,
115115
[]sql.Row{
116-
{int32(6), int32(3), "worktree", "[email protected]"},
117-
{int32(1), int32(4), "worktree", "[email protected]"},
118-
{int32(1), int32(3), "worktree", "[email protected]"},
116+
{int64(6), int32(3), "worktree", "[email protected]"},
117+
{int64(1), int32(4), "worktree", "[email protected]"},
118+
{int64(1), int32(3), "worktree", "[email protected]"},
119119
},
120120
},
121121
{
@@ -127,14 +127,14 @@ func TestIntegration(t *testing.T) {
127127
GROUP BY c.commit_hash
128128
) t WHERE num > 1`,
129129
[]sql.Row{
130-
{int32(3), "6ecf0ef2c2dffb796033e5a02219af86ec6584e5"},
131-
{int32(4), "918c48b83bd081e863dbe1b80f8998f058cd8294"},
132-
{int32(4), "af2d6a6954d532f8ffb47615169c8fdf9d383a1a"},
133-
{int32(4), "1669dce138d9b841a518c64b10914d88f5e488ea"},
134-
{int32(4), "a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69"},
135-
{int32(4), "b8e471f58bcbca63b07bda20e428190409c2db47"},
136-
{int32(4), "35e85108805c84807bc66a02d91535e1e24b38b9"},
137-
{int32(4), "b029517f6300c2da0f4b651b8642506cd6aaf45d"},
130+
{int64(3), "6ecf0ef2c2dffb796033e5a02219af86ec6584e5"},
131+
{int64(4), "918c48b83bd081e863dbe1b80f8998f058cd8294"},
132+
{int64(4), "af2d6a6954d532f8ffb47615169c8fdf9d383a1a"},
133+
{int64(4), "1669dce138d9b841a518c64b10914d88f5e488ea"},
134+
{int64(4), "a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69"},
135+
{int64(4), "b8e471f58bcbca63b07bda20e428190409c2db47"},
136+
{int64(4), "35e85108805c84807bc66a02d91535e1e24b38b9"},
137+
{int64(4), "b029517f6300c2da0f4b651b8642506cd6aaf45d"},
138138
},
139139
},
140140
{
@@ -145,7 +145,7 @@ func TestIntegration(t *testing.T) {
145145
WHERE refs.ref_name = 'HEAD'
146146
GROUP BY refs.repository_id`,
147147
[]sql.Row{
148-
{int32(9), "worktree"},
148+
{int64(9), "worktree"},
149149
},
150150
},
151151
{
@@ -154,15 +154,15 @@ func TestIntegration(t *testing.T) {
154154
NATURAL JOIN files f
155155
GROUP BY c.commit_hash`,
156156
[]sql.Row{
157-
{"b8e471f58bcbca63b07bda20e428190409c2db47", int32(3)},
158-
{"b029517f6300c2da0f4b651b8642506cd6aaf45d", int32(2)},
159-
{"af2d6a6954d532f8ffb47615169c8fdf9d383a1a", int32(6)},
160-
{"a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69", int32(3)},
161-
{"918c48b83bd081e863dbe1b80f8998f058cd8294", int32(8)},
162-
{"1669dce138d9b841a518c64b10914d88f5e488ea", int32(4)},
163-
{"35e85108805c84807bc66a02d91535e1e24b38b9", int32(3)},
164-
{"e8d3ffab552895c19b9fcf7aa264d277cde33881", int32(9)},
165-
{"6ecf0ef2c2dffb796033e5a02219af86ec6584e5", int32(9)},
157+
{"b8e471f58bcbca63b07bda20e428190409c2db47", int64(3)},
158+
{"b029517f6300c2da0f4b651b8642506cd6aaf45d", int64(2)},
159+
{"af2d6a6954d532f8ffb47615169c8fdf9d383a1a", int64(6)},
160+
{"a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69", int64(3)},
161+
{"918c48b83bd081e863dbe1b80f8998f058cd8294", int64(8)},
162+
{"1669dce138d9b841a518c64b10914d88f5e488ea", int64(4)},
163+
{"35e85108805c84807bc66a02d91535e1e24b38b9", int64(3)},
164+
{"e8d3ffab552895c19b9fcf7aa264d277cde33881", int64(9)},
165+
{"6ecf0ef2c2dffb796033e5a02219af86ec6584e5", int64(9)},
166166
},
167167
},
168168
{
@@ -325,26 +325,26 @@ func TestIntegration(t *testing.T) {
325325
ORDER BY repository_count DESC
326326
`,
327327
[]sql.Row{
328-
{"Text", int32(1)},
329-
{"Ignore List", int32(1)},
328+
{"Text", int64(1)},
329+
{"Ignore List", int64(1)},
330330
},
331331
},
332332
{
333333
`
334-
SELECT
334+
SELECT
335335
repository_id,
336-
contributor_count
336+
contributor_count
337337
FROM (
338-
SELECT
339-
repository_id,
340-
COUNT(DISTINCT commit_author_email) AS contributor_count
341-
FROM commits
338+
SELECT
339+
repository_id,
340+
COUNT(DISTINCT commit_author_email) AS contributor_count
341+
FROM commits
342342
GROUP BY repository_id
343-
) AS q
344-
ORDER BY contributor_count DESC
343+
) AS q
344+
ORDER BY contributor_count DESC
345345
LIMIT 10
346346
`,
347-
[]sql.Row{{"worktree", int32(9)}},
347+
[]sql.Row{{"worktree", int64(9)}},
348348
},
349349
}
350350

vendor/gopkg.in/src-d/go-mysql-server.v0/internal/regex/regex_go.go

Lines changed: 0 additions & 2 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/internal/regex/regex_oniguruma.go

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

0 commit comments

Comments
 (0)