Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

dep: update parser and other dependencies to latest #1289

Merged
merged 20 commits into from
Nov 27, 2020
Merged
Show file tree
Hide file tree
Changes from 4 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
33 changes: 13 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,46 @@ module github.com/pingcap/dm

require (
github.com/BurntSushi/toml v0.3.1
github.com/DATA-DOG/go-sqlmock v1.4.1
github.com/chaos-mesh/go-sqlsmith v0.0.0-20201014055312-2d45413c66bc
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/chaos-mesh/go-sqlsmith v0.0.0-20201120053641-47c50b530c01
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
github.com/coreos/go-semver v0.3.0
github.com/docker/go-units v0.4.0
github.com/dustin/go-humanize v1.0.0
github.com/go-sql-driver/mysql v1.5.0
github.com/gogo/gateway v1.1.0
github.com/gogo/protobuf v1.3.1
github.com/golang/mock v1.3.1
github.com/golang/mock v1.4.3
github.com/golang/protobuf v1.3.4
github.com/gorilla/websocket v1.4.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 // indirect
github.com/google/uuid v1.1.1
github.com/grpc-ecosystem/grpc-gateway v1.14.3
github.com/kami-zh/go-capturer v0.0.0-20171211120116-e492ea43421d
github.com/pingcap/check v0.0.0-20200212061837-5e12011dc712
github.com/pingcap/dumpling v0.0.0-20201028073240-ac8d8f304ab3
github.com/pingcap/errors v0.11.5-0.20200917111840-a15ef68f753d
github.com/pingcap/errors v0.11.5-0.20201029093017-5a7df2af2ac7
github.com/pingcap/failpoint v0.0.0-20200702092429-9f69995143ce
github.com/pingcap/log v0.0.0-20200828042413-fce0951f1463
github.com/pingcap/parser v0.0.0-20201020021731-5af7d42c2022
github.com/pingcap/tidb v1.1.0-beta.0.20200927065602-486e473a86e9
github.com/pingcap/log v0.0.0-20201112100606-8f1e84a3abc8
github.com/pingcap/parser v0.0.0-20201117030726-9d7d64259a5c
github.com/pingcap/tidb v1.1.0-beta.0.20201119113654-22feeb4aef75
github.com/pingcap/tidb-tools v4.0.7-0.20200927084250-e47e0e12c7f3+incompatible
github.com/prometheus/client_golang v1.5.1
github.com/rakyll/statik v0.1.6
github.com/satori/go.uuid v1.2.0
github.com/shopspring/decimal v0.0.0-20191125035519-b054a8dfd10d // indirect
github.com/siddontang/go v0.0.0-20180604090527-bdc77568d726
github.com/siddontang/go-log v0.0.0-20190221022429-1e957dd83bed // indirect
github.com/siddontang/go-mysql v0.0.0-20200222075837-12e89848f047
github.com/soheilhy/cmux v0.1.4
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/cobra v1.0.0
github.com/spf13/pflag v1.0.5
github.com/syndtr/goleveldb v1.0.1-0.20190625010220-02440ea7a285
github.com/tikv/pd v1.1.0-beta.0.20200907085700-5b04bec39b99
github.com/uber-go/atomic v1.4.0 // indirect
github.com/tikv/pd v1.1.0-beta.0.20201119053953-51eff4c1fa05
github.com/unrolled/render v1.0.1
go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738
go.etcd.io/etcd v0.5.0-alpha.5.0.20200824191128-ae9734ed278b
go.uber.org/zap v1.16.0
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9
golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb
google.golang.org/grpc v1.26.0
google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63
google.golang.org/grpc v1.27.1
gopkg.in/yaml.v2 v2.3.0
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 // indirect
)

go 1.13
545 changes: 541 additions & 4 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/binlog/reader/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"context"
"fmt"

"github.com/google/uuid"
"github.com/pingcap/errors"
uuid "github.com/satori/go.uuid"
gmysql "github.com/siddontang/go-mysql/mysql"
"github.com/siddontang/go-mysql/replication"
"go.uber.org/zap"
Expand Down
7 changes: 3 additions & 4 deletions pkg/parser/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ import (
)

const (
// SingleRenameTableNameNum stands for number of TableNames in a single table renaming. it's 4 not 2 because TiDB
// parser repeats first two TableNames at start
// ref https://github.com/pingcap/tidb/pull/3892
SingleRenameTableNameNum = 4
// SingleRenameTableNameNum stands for number of TableNames in a single table renaming. it's 2 after
// https://github.com/pingcap/parser/pull/1021
SingleRenameTableNameNum = 2
)

// Parse wraps parser.Parse(), makes `parser` suitable for dm
Expand Down
8 changes: 4 additions & 4 deletions pkg/parser/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ func (t *testParserSuite) TestResolveDDL(c *C) {
{{genTableName("test", "t1"), genTableName("xx", "t2")}},
{{genTableName("test", "t1")}},
{{genTableName("s1", "t1")}},
{{genTableName("s1", "t1"), genTableName("s2", "t2"), genTableName("s1", "t1"), genTableName("s2", "t2")}},
{{genTableName("test", "t1"), genTableName("test", "t2"), genTableName("test", "t1"), genTableName("test", "t2")}, {genTableName("s1", "t1"), genTableName("test", "t2"), genTableName("s1", "t1"), genTableName("test", "t2")}},
{{genTableName("s1", "t1"), genTableName("s2", "t2")}},
{{genTableName("test", "t1"), genTableName("test", "t2")}, {genTableName("s1", "t1"), genTableName("test", "t2")}},
{{genTableName("s1", "t1")}},
{{genTableName("test", "t1")}},
{{genTableName("test", "t1")}},
Expand Down Expand Up @@ -232,8 +232,8 @@ func (t *testParserSuite) TestResolveDDL(c *C) {
{{genTableName("xtest", "xt1"), genTableName("xxx", "xt2")}},
{{genTableName("xtest", "xt1")}},
{{genTableName("xs1", "xt1")}},
{{genTableName("xs1", "xt1"), genTableName("xs2", "xt2"), genTableName("xs1", "xt1"), genTableName("xs2", "xt2")}},
{{genTableName("xtest", "xt1"), genTableName("xtest", "xt2"), genTableName("xtest", "xt1"), genTableName("xtest", "xt2")}, {genTableName("xs1", "xt1"), genTableName("xtest", "xt2"), genTableName("xs1", "xt1"), genTableName("xtest", "xt2")}},
{{genTableName("xs1", "xt1"), genTableName("xs2", "xt2")}},
{{genTableName("xtest", "xt1"), genTableName("xtest", "xt2")}, {genTableName("xs1", "xt1"), genTableName("xtest", "xt2")}},
{{genTableName("xs1", "xt1")}},
{{genTableName("xtest", "xt1")}},
{{genTableName("xtest", "xt1")}},
Expand Down
2 changes: 1 addition & 1 deletion relay/writer/file_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"os"
"time"

"github.com/google/uuid"
"github.com/pingcap/parser"
uuid "github.com/satori/go.uuid"
gmysql "github.com/siddontang/go-mysql/mysql"
"github.com/siddontang/go-mysql/replication"

Expand Down
6 changes: 3 additions & 3 deletions syncer/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (
"fmt"
"time"

sqlmock "github.com/DATA-DOG/go-sqlmock"
"github.com/DATA-DOG/go-sqlmock"
gouuid "github.com/google/uuid"
. "github.com/pingcap/check"
"github.com/pingcap/tidb-tools/pkg/filter"
"github.com/pingcap/tidb/infoschema"
gouuid "github.com/satori/go.uuid"
"github.com/siddontang/go-mysql/mysql"
"github.com/siddontang/go-mysql/replication"
"go.uber.org/zap"
Expand Down Expand Up @@ -103,7 +103,7 @@ func (s *testDBSuite) resetBinlogSyncer(c *C) {
func (s *testDBSuite) TestGetServerUUID(c *C) {
uuid, err := utils.GetServerUUID(s.db, "mysql")
c.Assert(err, IsNil)
_, err = gouuid.FromString(uuid)
_, err = gouuid.Parse(uuid)
c.Assert(err, IsNil)
}

Expand Down
4 changes: 2 additions & 2 deletions syncer/err-operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"strings"
"sync"

uuid "github.com/satori/go.uuid"
"github.com/google/uuid"
"github.com/siddontang/go-mysql/replication"
"go.uber.org/zap"

Expand All @@ -40,7 +40,7 @@ type Operator struct {
// newOperator creates a new operator with a random UUID
func newOperator(op pb.ErrorOp, events []*replication.BinlogEvent) *Operator {
return &Operator{
uuid: uuid.NewV4().String(),
uuid: uuid.New().String(),
op: op,
events: events,
}
Expand Down