Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: bump tidb version #10295

Merged
merged 12 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ LDFLAGS += -X "$(CDC_PKG)/pkg/version.BuildTS=$(BUILDTS)"
LDFLAGS += -X "$(CDC_PKG)/pkg/version.GitHash=$(GITHASH)"
LDFLAGS += -X "$(CDC_PKG)/pkg/version.GitBranch=$(GITBRANCH)"
LDFLAGS += -X "$(CDC_PKG)/pkg/version.GoVersion=$(GOVERSION)"
LDFLAGS += -X "github.com/pingcap/tidb/parser/mysql.TiDBReleaseVersion=$(RELEASE_VERSION)"
LDFLAGS += -X "github.com/pingcap/tidb/pkg/parser/mysql.TiDBReleaseVersion=$(RELEASE_VERSION)"

include tools/Makefile
include Makefile.engine
Expand Down
2 changes: 1 addition & 1 deletion cdc/api/v2/api_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/google/uuid"
"github.com/pingcap/errors"
"github.com/pingcap/log"
tidbkv "github.com/pingcap/tidb/kv"
tidbkv "github.com/pingcap/tidb/pkg/kv"
"github.com/pingcap/tiflow/cdc/controller"
"github.com/pingcap/tiflow/cdc/entry"
"github.com/pingcap/tiflow/cdc/kv"
Expand Down
2 changes: 1 addition & 1 deletion cdc/api/v2/api_helpers_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cdc/api/v2/changefeed.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/pingcap/errors"
"github.com/pingcap/log"
tidbkv "github.com/pingcap/tidb/kv"
tidbkv "github.com/pingcap/tidb/pkg/kv"
"github.com/pingcap/tiflow/cdc/api"
"github.com/pingcap/tiflow/cdc/capture"
"github.com/pingcap/tiflow/cdc/model"
Expand Down
2 changes: 1 addition & 1 deletion cdc/api/v2/changefeed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"testing"

"github.com/golang/mock/gomock"
tidbkv "github.com/pingcap/tidb/kv"
tidbkv "github.com/pingcap/tidb/pkg/kv"
mock_capture "github.com/pingcap/tiflow/cdc/capture/mock"
"github.com/pingcap/tiflow/cdc/controller"
mock_controller "github.com/pingcap/tiflow/cdc/controller/mock"
Expand Down
2 changes: 1 addition & 1 deletion cdc/api/v2/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"github.com/pingcap/errors"
bf "github.com/pingcap/tidb-tools/pkg/binlog-filter"
filter "github.com/pingcap/tidb/util/table-filter"
filter "github.com/pingcap/tidb/pkg/util/table-filter"
"github.com/pingcap/tiflow/cdc/model"
"github.com/pingcap/tiflow/pkg/config"
cerror "github.com/pingcap/tiflow/pkg/errors"
Expand Down
2 changes: 1 addition & 1 deletion cdc/api/v2/model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"time"

bf "github.com/pingcap/tidb-tools/pkg/binlog-filter"
filter "github.com/pingcap/tidb/util/table-filter"
filter "github.com/pingcap/tidb/pkg/util/table-filter"
"github.com/pingcap/tiflow/cdc/model"
"github.com/pingcap/tiflow/pkg/config"
"github.com/pingcap/tiflow/pkg/redo"
Expand Down
2 changes: 1 addition & 1 deletion cdc/api/v2/unsafe.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"github.com/gin-gonic/gin"
"github.com/pingcap/errors"
tidbkv "github.com/pingcap/tidb/kv"
tidbkv "github.com/pingcap/tidb/pkg/kv"
"github.com/pingcap/tiflow/cdc/kv"
"github.com/pingcap/tiflow/cdc/model"
cerror "github.com/pingcap/tiflow/pkg/errors"
Expand Down
12 changes: 6 additions & 6 deletions cdc/entry/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import (
"time"

"github.com/pingcap/errors"
"github.com/pingcap/tidb/kv"
"github.com/pingcap/tidb/parser/mysql"
"github.com/pingcap/tidb/tablecodec"
"github.com/pingcap/tidb/types"
"github.com/pingcap/tidb/util/codec"
"github.com/pingcap/tidb/util/rowcodec"
"github.com/pingcap/tidb/pkg/kv"
"github.com/pingcap/tidb/pkg/parser/mysql"
"github.com/pingcap/tidb/pkg/tablecodec"
"github.com/pingcap/tidb/pkg/types"
"github.com/pingcap/tidb/pkg/util/codec"
"github.com/pingcap/tidb/pkg/util/rowcodec"
"github.com/pingcap/tiflow/cdc/model"
cerror "github.com/pingcap/tiflow/pkg/errors"
)
Expand Down
6 changes: 3 additions & 3 deletions cdc/entry/codec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ package entry
import (
"testing"

"github.com/pingcap/tidb/kv"
"github.com/pingcap/tidb/tablecodec"
"github.com/pingcap/tidb/util/codec"
"github.com/pingcap/tidb/pkg/kv"
"github.com/pingcap/tidb/pkg/tablecodec"
"github.com/pingcap/tidb/pkg/util/codec"
"github.com/stretchr/testify/require"
)

Expand Down
22 changes: 10 additions & 12 deletions cdc/entry/mounter.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ import (

"github.com/pingcap/errors"
"github.com/pingcap/log"
"github.com/pingcap/tidb/kv"
timodel "github.com/pingcap/tidb/parser/model"
"github.com/pingcap/tidb/parser/mysql"
"github.com/pingcap/tidb/sessionctx/stmtctx"
"github.com/pingcap/tidb/table"
"github.com/pingcap/tidb/tablecodec"
"github.com/pingcap/tidb/types"
"github.com/pingcap/tidb/util/rowcodec"
"github.com/pingcap/tidb/pkg/kv"
timodel "github.com/pingcap/tidb/pkg/parser/model"
"github.com/pingcap/tidb/pkg/parser/mysql"
"github.com/pingcap/tidb/pkg/sessionctx/stmtctx"
"github.com/pingcap/tidb/pkg/table"
"github.com/pingcap/tidb/pkg/tablecodec"
"github.com/pingcap/tidb/pkg/types"
"github.com/pingcap/tidb/pkg/util/rowcodec"
"github.com/pingcap/tiflow/cdc/model"
cerror "github.com/pingcap/tiflow/pkg/errors"
pfilter "github.com/pingcap/tiflow/pkg/filter"
Expand Down Expand Up @@ -111,9 +111,7 @@ func NewMounter(schemaStorage SchemaStorage,
integrity: integrity,

encoder: &rowcodec.Encoder{},
sctx: &stmtctx.StatementContext{
TimeZone: tz,
},
sctx: stmtctx.NewStmtCtxWithTimeZone(tz),
}
}

Expand Down Expand Up @@ -653,7 +651,7 @@ func formatColVal(datum types.Datum, col *timodel.ColumnInfo) (
return v, int(sizeOfV), "", nil
case mysql.TypeBit:
// Encode bits as integers to avoid pingcap/tidb#10988 (which also affects MySQL itself)
v, err := datum.GetBinaryLiteral().ToInt(nil)
v, err := datum.GetBinaryLiteral().ToInt(types.DefaultStmtNoWarningContext)
const sizeOfV = unsafe.Sizeof(v)
return v, int(sizeOfV), "", err
case mysql.TypeString, mysql.TypeVarString, mysql.TypeVarchar,
Expand Down
28 changes: 14 additions & 14 deletions cdc/entry/mounter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ import (
"time"

"github.com/pingcap/log"
ticonfig "github.com/pingcap/tidb/config"
"github.com/pingcap/tidb/ddl"
"github.com/pingcap/tidb/executor"
tidbkv "github.com/pingcap/tidb/kv"
"github.com/pingcap/tidb/meta/autoid"
"github.com/pingcap/tidb/parser"
"github.com/pingcap/tidb/parser/ast"
timodel "github.com/pingcap/tidb/parser/model"
"github.com/pingcap/tidb/parser/mysql"
"github.com/pingcap/tidb/session"
"github.com/pingcap/tidb/store/mockstore"
"github.com/pingcap/tidb/testkit"
"github.com/pingcap/tidb/types"
"github.com/pingcap/tidb/util/mock"
ticonfig "github.com/pingcap/tidb/pkg/config"
"github.com/pingcap/tidb/pkg/ddl"
"github.com/pingcap/tidb/pkg/executor"
tidbkv "github.com/pingcap/tidb/pkg/kv"
"github.com/pingcap/tidb/pkg/meta/autoid"
"github.com/pingcap/tidb/pkg/parser"
"github.com/pingcap/tidb/pkg/parser/ast"
timodel "github.com/pingcap/tidb/pkg/parser/model"
"github.com/pingcap/tidb/pkg/parser/mysql"
"github.com/pingcap/tidb/pkg/session"
"github.com/pingcap/tidb/pkg/store/mockstore"
"github.com/pingcap/tidb/pkg/testkit"
"github.com/pingcap/tidb/pkg/types"
"github.com/pingcap/tidb/pkg/util/mock"
"github.com/pingcap/tiflow/cdc/model"
"github.com/pingcap/tiflow/pkg/config"
cerror "github.com/pingcap/tiflow/pkg/errors"
Expand Down
4 changes: 2 additions & 2 deletions cdc/entry/schema/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"github.com/google/btree"
"github.com/pingcap/errors"
"github.com/pingcap/log"
timeta "github.com/pingcap/tidb/meta"
timodel "github.com/pingcap/tidb/parser/model"
timeta "github.com/pingcap/tidb/pkg/meta"
timodel "github.com/pingcap/tidb/pkg/parser/model"
"github.com/pingcap/tiflow/cdc/model"
cerror "github.com/pingcap/tiflow/pkg/errors"
"github.com/pingcap/tiflow/pkg/filter"
Expand Down
2 changes: 1 addition & 1 deletion cdc/entry/schema/snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"fmt"
"testing"

timodel "github.com/pingcap/tidb/parser/model"
timodel "github.com/pingcap/tidb/pkg/parser/model"
"github.com/pingcap/tiflow/cdc/model"
"github.com/stretchr/testify/require"
)
Expand Down
4 changes: 2 additions & 2 deletions cdc/entry/schema_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (

"github.com/pingcap/errors"
"github.com/pingcap/log"
timeta "github.com/pingcap/tidb/meta"
timodel "github.com/pingcap/tidb/parser/model"
timeta "github.com/pingcap/tidb/pkg/meta"
timodel "github.com/pingcap/tidb/pkg/parser/model"
schema "github.com/pingcap/tiflow/cdc/entry/schema"
"github.com/pingcap/tiflow/cdc/model"
cerror "github.com/pingcap/tiflow/pkg/errors"
Expand Down
24 changes: 12 additions & 12 deletions cdc/entry/schema_storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ import (

"github.com/pingcap/errors"
"github.com/pingcap/log"
ticonfig "github.com/pingcap/tidb/config"
"github.com/pingcap/tidb/ddl"
"github.com/pingcap/tidb/domain"
tidbkv "github.com/pingcap/tidb/kv"
timeta "github.com/pingcap/tidb/meta"
timodel "github.com/pingcap/tidb/parser/model"
"github.com/pingcap/tidb/parser/mysql"
"github.com/pingcap/tidb/session"
"github.com/pingcap/tidb/sessionctx"
"github.com/pingcap/tidb/store/mockstore"
"github.com/pingcap/tidb/testkit"
"github.com/pingcap/tidb/types"
ticonfig "github.com/pingcap/tidb/pkg/config"
"github.com/pingcap/tidb/pkg/ddl"
"github.com/pingcap/tidb/pkg/domain"
tidbkv "github.com/pingcap/tidb/pkg/kv"
timeta "github.com/pingcap/tidb/pkg/meta"
timodel "github.com/pingcap/tidb/pkg/parser/model"
"github.com/pingcap/tidb/pkg/parser/mysql"
"github.com/pingcap/tidb/pkg/session"
"github.com/pingcap/tidb/pkg/sessionctx"
"github.com/pingcap/tidb/pkg/store/mockstore"
"github.com/pingcap/tidb/pkg/testkit"
"github.com/pingcap/tidb/pkg/types"
"github.com/pingcap/tiflow/cdc/entry/schema"
"github.com/pingcap/tiflow/cdc/kv"
"github.com/pingcap/tiflow/cdc/model"
Expand Down
18 changes: 9 additions & 9 deletions cdc/entry/schema_test_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ import (
"testing"
"time"

ticonfig "github.com/pingcap/tidb/config"
tiddl "github.com/pingcap/tidb/ddl"
"github.com/pingcap/tidb/domain"
"github.com/pingcap/tidb/kv"
timeta "github.com/pingcap/tidb/meta"
timodel "github.com/pingcap/tidb/parser/model"
"github.com/pingcap/tidb/session"
"github.com/pingcap/tidb/store/mockstore"
"github.com/pingcap/tidb/testkit"
ticonfig "github.com/pingcap/tidb/pkg/config"
tiddl "github.com/pingcap/tidb/pkg/ddl"
"github.com/pingcap/tidb/pkg/domain"
"github.com/pingcap/tidb/pkg/kv"
timeta "github.com/pingcap/tidb/pkg/meta"
timodel "github.com/pingcap/tidb/pkg/parser/model"
"github.com/pingcap/tidb/pkg/session"
"github.com/pingcap/tidb/pkg/store/mockstore"
"github.com/pingcap/tidb/pkg/testkit"
"github.com/pingcap/tiflow/cdc/model"
"github.com/pingcap/tiflow/pkg/config"
"github.com/pingcap/tiflow/pkg/filter"
Expand Down
2 changes: 1 addition & 1 deletion cdc/entry/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package entry

import (
"github.com/pingcap/errors"
tidbkv "github.com/pingcap/tidb/kv"
tidbkv "github.com/pingcap/tidb/pkg/kv"
"github.com/pingcap/tiflow/cdc/entry/schema"
"github.com/pingcap/tiflow/cdc/kv"
"github.com/pingcap/tiflow/cdc/model"
Expand Down
2 changes: 1 addition & 1 deletion cdc/kv/client_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/cdcpb"
"github.com/pingcap/log"
"github.com/pingcap/tidb/store/mockstore/mockcopr"
"github.com/pingcap/tidb/pkg/store/mockstore/mockcopr"
"github.com/pingcap/tiflow/cdc/model"
"github.com/pingcap/tiflow/cdc/processor/tablepb"
"github.com/pingcap/tiflow/pkg/config"
Expand Down
4 changes: 2 additions & 2 deletions cdc/kv/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
"github.com/pingcap/kvproto/pkg/errorpb"
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/log"
"github.com/pingcap/tidb/kv"
"github.com/pingcap/tidb/store/mockstore/mockcopr"
"github.com/pingcap/tidb/pkg/kv"
"github.com/pingcap/tidb/pkg/store/mockstore/mockcopr"
"github.com/pingcap/tiflow/cdc/model"
"github.com/pingcap/tiflow/cdc/processor/tablepb"
"github.com/pingcap/tiflow/pkg/config"
Expand Down
2 changes: 1 addition & 1 deletion cdc/kv/shared_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"time"

"github.com/pingcap/kvproto/pkg/cdcpb"
"github.com/pingcap/tidb/store/mockstore/mockcopr"
"github.com/pingcap/tidb/pkg/store/mockstore/mockcopr"
"github.com/pingcap/tiflow/cdc/kv/regionlock"
"github.com/pingcap/tiflow/cdc/kv/sharedconn"
"github.com/pingcap/tiflow/cdc/model"
Expand Down
6 changes: 3 additions & 3 deletions cdc/kv/store_op.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (
"fmt"

"github.com/pingcap/errors"
tidbkv "github.com/pingcap/tidb/kv"
"github.com/pingcap/tidb/meta"
"github.com/pingcap/tidb/store/driver"
tidbkv "github.com/pingcap/tidb/pkg/kv"
"github.com/pingcap/tidb/pkg/meta"
"github.com/pingcap/tidb/pkg/store/driver"
cerror "github.com/pingcap/tiflow/pkg/errors"
"github.com/pingcap/tiflow/pkg/flags"
"github.com/pingcap/tiflow/pkg/security"
Expand Down
2 changes: 1 addition & 1 deletion cdc/model/changefeed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"testing"
"time"

filter "github.com/pingcap/tidb/util/table-filter"
filter "github.com/pingcap/tidb/pkg/util/table-filter"
"github.com/pingcap/tiflow/pkg/config"
"github.com/pingcap/tiflow/pkg/errors"
"github.com/pingcap/tiflow/pkg/util"
Expand Down
2 changes: 1 addition & 1 deletion cdc/model/codec/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package codec
import (
"encoding/binary"

timodel "github.com/pingcap/tidb/parser/model"
timodel "github.com/pingcap/tidb/pkg/parser/model"
"github.com/pingcap/tiflow/cdc/model"
codecv1 "github.com/pingcap/tiflow/cdc/model/codec/v1"
"github.com/tinylib/msgp/msgp"
Expand Down
6 changes: 3 additions & 3 deletions cdc/model/codec/codec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ package codec
import (
"testing"

"github.com/pingcap/tidb/parser/charset"
timodel "github.com/pingcap/tidb/parser/model"
"github.com/pingcap/tidb/parser/mysql"
"github.com/pingcap/tidb/pkg/parser/charset"
timodel "github.com/pingcap/tidb/pkg/parser/model"
"github.com/pingcap/tidb/pkg/parser/mysql"
"github.com/pingcap/tiflow/cdc/model"
codecv1 "github.com/pingcap/tiflow/cdc/model/codec/v1"
"github.com/stretchr/testify/require"
Expand Down
4 changes: 2 additions & 2 deletions cdc/model/codec/v1/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
package v1

import (
timodel "github.com/pingcap/tidb/parser/model"
"github.com/pingcap/tidb/util/rowcodec"
timodel "github.com/pingcap/tidb/pkg/parser/model"
"github.com/pingcap/tidb/pkg/util/rowcodec"
"github.com/pingcap/tiflow/cdc/model"
)

Expand Down
2 changes: 1 addition & 1 deletion cdc/model/codec/v1/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package v1
import (
"bytes"

timodel "github.com/pingcap/tidb/parser/model"
timodel "github.com/pingcap/tidb/pkg/parser/model"
"github.com/pingcap/tiflow/cdc/model"
)

Expand Down
6 changes: 3 additions & 3 deletions cdc/model/codec/v1/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ package v1
import (
"testing"

"github.com/pingcap/tidb/parser/charset"
timodel "github.com/pingcap/tidb/parser/model"
"github.com/pingcap/tidb/parser/mysql"
"github.com/pingcap/tidb/pkg/parser/charset"
timodel "github.com/pingcap/tidb/pkg/parser/model"
"github.com/pingcap/tidb/pkg/parser/mysql"
"github.com/pingcap/tiflow/cdc/model"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion cdc/model/mounter.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"math"

"github.com/pingcap/log"
"github.com/pingcap/tidb/types"
"github.com/pingcap/tidb/pkg/types"
"go.uber.org/zap"
)

Expand Down
Loading
Loading