Skip to content

Commit 57e88e5

Browse files
authored
feat(*): upgrade tidb for release-8.5-20260129-v8.5.5 feature branch to support partial index grammar. (#4116)
close #3698
1 parent 618d1ab commit 57e88e5

File tree

10 files changed

+148
-1866
lines changed

10 files changed

+148
-1866
lines changed

coordinator/coordinator_test.go

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -44,86 +44,19 @@ import (
4444
"github.com/pingcap/ticdc/server/watcher"
4545
"github.com/stretchr/testify/require"
4646
pd "github.com/tikv/pd/client"
47-
pdgc "github.com/tikv/pd/client/clients/gc"
4847
"go.uber.org/zap"
4948
"google.golang.org/grpc"
5049
)
5150

5251
type mockPdClient struct {
5352
pd.Client
54-
mu sync.Mutex
55-
gcClient map[uint32]*mockGCStatesClient
53+
mu sync.Mutex
5654
}
5755

5856
func (m *mockPdClient) UpdateServiceGCSafePoint(ctx context.Context, serviceID string, ttl int64, safePoint uint64) (uint64, error) {
5957
return safePoint, nil
6058
}
6159

62-
func (m *mockPdClient) GetGCStatesClient(keyspaceID uint32) pdgc.GCStatesClient {
63-
m.mu.Lock()
64-
defer m.mu.Unlock()
65-
66-
if m.gcClient == nil {
67-
m.gcClient = make(map[uint32]*mockGCStatesClient)
68-
}
69-
if cli, ok := m.gcClient[keyspaceID]; ok {
70-
return cli
71-
}
72-
cli := newMockGCStatesClient(keyspaceID)
73-
m.gcClient[keyspaceID] = cli
74-
return cli
75-
}
76-
77-
type mockGCStatesClient struct {
78-
keyspaceID uint32
79-
80-
mu sync.Mutex
81-
barriers map[string]*pdgc.GCBarrierInfo
82-
}
83-
84-
func newMockGCStatesClient(keyspaceID uint32) *mockGCStatesClient {
85-
return &mockGCStatesClient{
86-
keyspaceID: keyspaceID,
87-
barriers: make(map[string]*pdgc.GCBarrierInfo),
88-
}
89-
}
90-
91-
func (c *mockGCStatesClient) SetGCBarrier(ctx context.Context, barrierID string, barrierTS uint64, ttl time.Duration) (*pdgc.GCBarrierInfo, error) {
92-
c.mu.Lock()
93-
defer c.mu.Unlock()
94-
95-
info := pdgc.NewGCBarrierInfo(barrierID, barrierTS, ttl, time.Now())
96-
c.barriers[barrierID] = info
97-
return info, nil
98-
}
99-
100-
func (c *mockGCStatesClient) DeleteGCBarrier(ctx context.Context, barrierID string) (*pdgc.GCBarrierInfo, error) {
101-
c.mu.Lock()
102-
defer c.mu.Unlock()
103-
104-
info, ok := c.barriers[barrierID]
105-
if ok {
106-
delete(c.barriers, barrierID)
107-
}
108-
return info, nil
109-
}
110-
111-
func (c *mockGCStatesClient) GetGCState(ctx context.Context) (pdgc.GCState, error) {
112-
c.mu.Lock()
113-
defer c.mu.Unlock()
114-
115-
barriers := make([]*pdgc.GCBarrierInfo, 0, len(c.barriers))
116-
for _, info := range c.barriers {
117-
barriers = append(barriers, info)
118-
}
119-
return pdgc.GCState{
120-
KeyspaceID: c.keyspaceID,
121-
TxnSafePoint: 0,
122-
GCSafePoint: 0,
123-
GCBarriers: barriers,
124-
}, nil
125-
}
126-
12760
type mockMaintainerManager struct {
12861
mc messaging.MessageCenter
12962
msgCh chan *messaging.TargetMessage

downstreamadapter/sink/mysql/causality/helper_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"github.com/pingcap/ticdc/pkg/common"
2020
commonEvent "github.com/pingcap/ticdc/pkg/common/event"
2121
timodel "github.com/pingcap/tidb/pkg/meta/model"
22-
"github.com/pingcap/tidb/pkg/parser/ast"
22+
"github.com/pingcap/tidb/pkg/parser/model"
2323
"github.com/pingcap/tidb/pkg/parser/mysql"
2424
"github.com/pingcap/tidb/pkg/types"
2525
"github.com/pingcap/tidb/pkg/util/chunk"
@@ -34,35 +34,35 @@ func TestGenKeyListUsesSchemaIndexWithVirtualGeneratedColumn(t *testing.T) {
3434

3535
tableInfo := common.WrapTableInfo("test", &timodel.TableInfo{
3636
ID: 100,
37-
Name: ast.NewCIStr("t"),
37+
Name: model.NewCIStr("t"),
3838
PKIsHandle: true,
3939
Columns: []*timodel.ColumnInfo{
4040
{
4141
ID: 1,
4242
Offset: 0,
43-
Name: ast.NewCIStr("a"),
43+
Name: model.NewCIStr("a"),
4444
State: timodel.StatePublic,
4545
FieldType: *types.NewFieldType(mysql.TypeLong),
4646
},
4747
{
4848
ID: 2,
4949
Offset: 1,
50-
Name: ast.NewCIStr("v"),
50+
Name: model.NewCIStr("v"),
5151
State: timodel.StatePublic,
5252
GeneratedExprString: "a + 1",
5353
FieldType: *types.NewFieldType(mysql.TypeLong),
5454
},
5555
{
5656
ID: 3,
5757
Offset: 2,
58-
Name: ast.NewCIStr("b"),
58+
Name: model.NewCIStr("b"),
5959
State: timodel.StatePublic,
6060
FieldType: *types.NewFieldType(mysql.TypeLong),
6161
},
6262
{
6363
ID: 4,
6464
Offset: 3,
65-
Name: ast.NewCIStr("id"),
65+
Name: model.NewCIStr("id"),
6666
State: timodel.StatePublic,
6767
FieldType: *idFieldType,
6868
},
@@ -95,35 +95,35 @@ func TestGenRowKeysStableAcrossUpdateAndDeleteWithVirtualGeneratedColumn(t *test
9595

9696
tableInfo := common.WrapTableInfo("test", &timodel.TableInfo{
9797
ID: 100,
98-
Name: ast.NewCIStr("t"),
98+
Name: model.NewCIStr("t"),
9999
PKIsHandle: true,
100100
Columns: []*timodel.ColumnInfo{
101101
{
102102
ID: 1,
103103
Offset: 0,
104-
Name: ast.NewCIStr("a"),
104+
Name: model.NewCIStr("a"),
105105
State: timodel.StatePublic,
106106
FieldType: *types.NewFieldType(mysql.TypeLong),
107107
},
108108
{
109109
ID: 2,
110110
Offset: 1,
111-
Name: ast.NewCIStr("v"),
111+
Name: model.NewCIStr("v"),
112112
State: timodel.StatePublic,
113113
GeneratedExprString: "a + 1",
114114
FieldType: *types.NewFieldType(mysql.TypeLong),
115115
},
116116
{
117117
ID: 3,
118118
Offset: 2,
119-
Name: ast.NewCIStr("b"),
119+
Name: model.NewCIStr("b"),
120120
State: timodel.StatePublic,
121121
FieldType: *types.NewFieldType(mysql.TypeLong),
122122
},
123123
{
124124
ID: 4,
125125
Offset: 3,
126-
Name: ast.NewCIStr("id"),
126+
Name: model.NewCIStr("id"),
127127
State: timodel.StatePublic,
128128
FieldType: *idFieldType,
129129
},

go.mod

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ require (
2828
github.com/go-mysql-org/go-mysql v1.12.0
2929
github.com/go-oauth2/oauth2/v4 v4.5.4
3030
github.com/go-sql-driver/mysql v1.7.1
31-
github.com/goccy/go-json v0.10.2
31+
github.com/goccy/go-json v0.10.4
3232
github.com/gogo/protobuf v1.3.2
3333
github.com/golang-jwt/jwt/v5 v5.3.0
3434
github.com/golang/mock v1.6.0
@@ -46,18 +46,18 @@ require (
4646
github.com/linkedin/goavro/v2 v2.14.0
4747
github.com/mailru/easyjson v0.9.1
4848
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
49-
github.com/pierrec/lz4/v4 v4.1.18
49+
github.com/pierrec/lz4/v4 v4.1.21
5050
github.com/pingcap/check v0.0.0-20211026125417-57bd13f7b5f0
5151
github.com/pingcap/errors v0.11.5-0.20250523034308-74f78ae071ee
5252
github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86
53-
github.com/pingcap/kvproto v0.0.0-20250923091925-d79d11002599
53+
github.com/pingcap/kvproto v0.0.0-20260127035637-77643524c499
5454
github.com/pingcap/log v1.1.1-0.20250917021125-19901e015dc9
5555
github.com/pingcap/sysutil v1.0.1-0.20240311050922-ae81ee01f3a5
56-
github.com/pingcap/tidb v1.1.0-beta.0.20250415080739-a02630cc24cf
56+
github.com/pingcap/tidb v1.1.0-beta.0.20260130063659-ab5c2a528dd0
5757
github.com/pingcap/tidb-dashboard v0.0.0-20250928152019-e111aaee93f4
58-
github.com/pingcap/tidb/pkg/parser v0.0.0-20241120103608-82376c7732c1
59-
github.com/pingcap/tiflow v0.0.0-20251226072601-0cb0aaf25061
60-
github.com/prometheus/client_golang v1.22.0
58+
github.com/pingcap/tidb/pkg/parser v0.0.0-20260130063659-ab5c2a528dd0
59+
github.com/pingcap/tiflow v0.0.0-20260202045830-0d829f632635
60+
github.com/prometheus/client_golang v1.23.0
6161
github.com/r3labs/diff v1.1.0
6262
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
6363
github.com/robfig/cron v1.2.0
@@ -67,9 +67,9 @@ require (
6767
github.com/spf13/pflag v1.0.7
6868
github.com/stretchr/testify v1.10.0
6969
github.com/thanhpk/randstr v1.0.6
70-
github.com/tikv/client-go/v2 v2.0.8-0.20250304121540-cc8b9491145b
70+
github.com/tikv/client-go/v2 v2.0.8-0.20260112052152-1d3c5ec76bf8
7171
github.com/tikv/pd v1.1.0-beta.0.20251113050911-303c6c3b403e
72-
github.com/tikv/pd/client v0.0.0-20250213080903-727c2086a763
72+
github.com/tikv/pd/client v0.0.0-20251219084741-029eb6e7d5d0
7373
github.com/tinylib/msgp v1.5.0
7474
github.com/uber-go/atomic v1.4.0
7575
github.com/xdg/scram v1.0.5
@@ -85,14 +85,14 @@ require (
8585
go.uber.org/multierr v1.11.0
8686
go.uber.org/zap v1.27.0
8787
golang.org/x/net v0.47.0
88-
golang.org/x/oauth2 v0.30.0
88+
golang.org/x/oauth2 v0.33.0
8989
golang.org/x/sync v0.18.0
9090
golang.org/x/sys v0.38.0
9191
golang.org/x/term v0.37.0
9292
golang.org/x/text v0.31.0
93-
golang.org/x/time v0.12.0
93+
golang.org/x/time v0.14.0
9494
google.golang.org/grpc v1.65.0
95-
google.golang.org/protobuf v1.36.6
95+
google.golang.org/protobuf v1.36.10
9696
)
9797

9898
require (
@@ -115,9 +115,9 @@ require (
115115
github.com/VividCortex/ewma v1.2.0 // indirect
116116
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
117117
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1581 // indirect
118-
github.com/andybalholm/brotli v1.0.5 // indirect
119-
github.com/apache/arrow/go/v12 v12.0.1 // indirect
120-
github.com/apache/thrift v0.16.0 // indirect
118+
github.com/andybalholm/brotli v1.1.1 // indirect
119+
github.com/apache/arrow-go/v18 v18.0.0 // indirect
120+
github.com/apache/thrift v0.21.0 // indirect
121121
github.com/ardielle/ardielle-go v1.5.2 // indirect
122122
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
123123
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.14 // indirect
@@ -189,15 +189,14 @@ require (
189189
github.com/go-playground/universal-translator v0.18.1 // indirect
190190
github.com/go-playground/validator/v10 v10.20.0 // indirect
191191
github.com/go-resty/resty/v2 v2.11.0 // indirect
192-
github.com/goccy/go-reflect v1.2.0 // indirect
193192
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
194193
github.com/godbus/dbus/v5 v5.0.4 // indirect
195194
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
196195
github.com/golang/glog v1.2.4 // indirect
197196
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
198197
github.com/golang/protobuf v1.5.4 // indirect
199198
github.com/golang/snappy v0.0.4 // indirect
200-
github.com/google/flatbuffers v2.0.8+incompatible // indirect
199+
github.com/google/flatbuffers v24.3.25+incompatible // indirect
201200
github.com/google/gofuzz v1.2.0 // indirect
202201
github.com/google/pprof v0.0.0-20241001023024-f4c0cfd0cf1d // indirect
203202
github.com/google/s2a-go v0.1.7 // indirect
@@ -208,7 +207,7 @@ require (
208207
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
209208
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect
210209
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
211-
github.com/hamba/avro/v2 v2.22.2-0.20240625062549-66aad10411d9 // indirect
210+
github.com/hamba/avro/v2 v2.27.0 // indirect
212211
github.com/hashicorp/errwrap v1.1.0 // indirect
213212
github.com/hashicorp/go-multierror v1.1.1 // indirect
214213
github.com/hashicorp/go-uuid v1.0.3 // indirect
@@ -233,7 +232,7 @@ require (
233232
github.com/josharian/intern v1.0.0 // indirect
234233
github.com/klauspost/asmfmt v1.3.2 // indirect
235234
github.com/klauspost/cpuid v1.3.1 // indirect
236-
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
235+
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
237236
github.com/kr/pretty v0.3.1 // indirect
238237
github.com/kr/text v0.2.0 // indirect
239238
github.com/ks3sdklib/aws-sdk-go v1.2.9 // indirect
@@ -270,30 +269,31 @@ require (
270269
github.com/pingcap/badger v1.5.1-0.20241015064302-38533b6cbf8d // indirect
271270
github.com/pingcap/fn v1.0.0 // indirect
272271
github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989 // indirect
273-
github.com/pingcap/tipb v0.0.0-20250829062436-85a019a5df23 // indirect
272+
github.com/pingcap/tipb v0.0.0-20251125085256-097db0b2c02a // indirect
274273
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
275274
github.com/pkg/errors v0.9.1 // indirect
276275
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
277276
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect
278277
github.com/prometheus/client_model v0.6.2 // indirect
279-
github.com/prometheus/common v0.63.0 // indirect
280-
github.com/prometheus/procfs v0.16.1 // indirect
278+
github.com/prometheus/common v0.65.0 // indirect
279+
github.com/prometheus/procfs v0.19.2 // indirect
281280
github.com/qri-io/jsonpointer v0.1.1 // indirect
282281
github.com/qri-io/jsonschema v0.2.1 // indirect
283282
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
284283
github.com/rivo/uniseg v0.4.7 // indirect
285284
github.com/robfig/cron/v3 v3.0.1 // indirect
286285
github.com/rogpeppe/go-internal v1.14.1 // indirect
287286
github.com/rs/cors v1.7.0 // indirect
288-
github.com/sasha-s/go-deadlock v0.3.5 // indirect
287+
github.com/sasha-s/go-deadlock v0.3.6 // indirect
289288
github.com/segmentio/asm v1.2.0 // indirect
290289
github.com/segmentio/kafka-go v0.4.41-0.20230526171612-f057b1d369cd // indirect
291-
github.com/shoenig/go-m1cpu v0.1.6 // indirect
290+
github.com/shoenig/go-m1cpu v0.1.7 // indirect
292291
github.com/shopspring/decimal v1.3.0 // indirect
293292
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c // indirect
294293
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 // indirect
295294
github.com/sirupsen/logrus v1.9.3 // indirect
296295
github.com/spaolacci/murmur3 v1.1.0 // indirect
296+
github.com/spf13/afero v1.11.0 // indirect
297297
github.com/spkg/bom v1.0.0 // indirect
298298
github.com/stretchr/objx v0.5.2 // indirect
299299
github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2 // indirect
@@ -309,8 +309,8 @@ require (
309309
github.com/tidwall/pretty v1.2.1 // indirect
310310
github.com/tidwall/rtred v0.1.2 // indirect
311311
github.com/tidwall/tinyqueue v0.1.1 // indirect
312-
github.com/tklauser/go-sysconf v0.3.12 // indirect
313-
github.com/tklauser/numcpus v0.6.1 // indirect
312+
github.com/tklauser/go-sysconf v0.3.15 // indirect
313+
github.com/tklauser/numcpus v0.10.0 // indirect
314314
github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 // indirect
315315
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
316316
github.com/twmb/murmur3 v1.1.6 // indirect
@@ -324,7 +324,6 @@ require (
324324
github.com/xdg-go/stringprep v1.0.4 // indirect
325325
github.com/xdg/stringprep v1.0.3 // indirect
326326
github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 // indirect
327-
github.com/xitongsys/parquet-go v1.6.3-0.20240520233950-75e935fc3e17 // indirect
328327
github.com/yusufpapurcu/wmi v1.2.4 // indirect
329328
github.com/zeebo/xxh3 v1.0.2 // indirect
330329
go.etcd.io/bbolt v1.3.10 // indirect
@@ -343,14 +342,14 @@ require (
343342
golang.org/x/arch v0.8.0 // indirect
344343
golang.org/x/crypto v0.45.0 // indirect
345344
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
346-
golang.org/x/mod v0.29.0 // indirect
347-
golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8 // indirect
348-
golang.org/x/tools v0.38.0 // indirect
349-
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
345+
golang.org/x/mod v0.30.0 // indirect
346+
golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 // indirect
347+
golang.org/x/tools v0.39.0 // indirect
348+
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
350349
google.golang.org/api v0.170.0 // indirect
351350
google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda // indirect
352351
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
353-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect
352+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250425173222-7b384671a197 // indirect
354353
gopkg.in/inf.v0 v0.9.1 // indirect
355354
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
356355
gopkg.in/yaml.v2 v2.4.0 // indirect
@@ -370,10 +369,7 @@ require (
370369
// copy from TiDB
371370
replace github.com/go-ldap/ldap/v3 v3.4.4 => github.com/yangkeao/ldap/v3 v3.4.5-0.20230421065457-369a3bab1117
372371

373-
replace github.com/tikv/pd/client => github.com/tikv/pd/client v0.0.0-20250213080903-727c2086a763
374-
375-
replace github.com/pingcap/tipb => github.com/pingcap/tipb v0.0.0-20241022082558-0607513e7fa4
376-
377-
replace github.com/pingcap/kvproto => github.com/pingcap/kvproto v0.0.0-20250224053625-b6a98c6bf02d
372+
// copy from TiDB to downgrade grpc
373+
replace github.com/apache/arrow-go/v18 => github.com/joechenrh/arrow-go/v18 v18.0.0-20250911101656-62c34c9a3b82
378374

379375
replace github.com/IBM/sarama v1.41.2 => github.com/pingcap/sarama v1.41.2-pingcap-20251202-x

0 commit comments

Comments
 (0)