WangXiangUSTC / tidb-lite

Using tidb-lite to create a TiDB server with mocktikv mode in your application or unit test.
Apache License 2.0
54 stars 16 forks source link

tidb error #20

Open paulmarkyes opened 3 years ago

paulmarkyes commented 3 years ago

github.com/pingcap/tidb/util/memory

../../../go/go_modules/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20191211070559-a94cff903cd1/util/memory/action.go:103:47: undefined: mysql.ErrMemExceedThreshold ../../../go/go_modules/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20191211070559-a94cff903cd1/util/memory/action.go:113:3: undefined: mysql.ErrMemExceedThreshold ../../../go/go_modules/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20191211070559-a94cff903cd1/util/memory/action.go:115:48: cannot use errCodes (type map[terror.ErrCode]uint16) as type map[terror.ErrCode]struct {} in assignment

github.com/pingcap/tidb/metrics

../../../go/go_modules/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20191211070559-a94cff903cd1/metrics/server.go:175:11: x.Class undefined (type *errors.Error has no field or method Class)

github.com/pingcap/tidb/types/json

../../../go/go_modules/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20191211070559-a94cff903cd1/types/json/constants.go:210:88: cannot use mysql.MySQLErrName[mysql.ErrInvalidJSONText] (type mysql.ErrMessage) as type string in argument to terror.ClassJSON.New ../../../go/go_modules/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20191211070559-a94cff903cd1/types/json/constants.go:212:88: cannot use mysql.MySQLErrName[mysql.ErrInvalidJSONPath] (type mysql.ErrMessage) as type string in argument to terror.ClassJSON.New ../../../go/go_modules/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20191211070559-a94cff903cd1/types/json/constants.go:214:88: cannot use mysql.MySQLErrName[mysql.ErrInvalidJSONData] (type mysql.ErrMessage) as type string in argument to terror.ClassJSON.New ../../../go/go_modules/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20191211070559-a94cff903cd1/types/json/constants.go:216:104: cannot use mysql.MySQLErrName[mysql.ErrInvalidJSONPathWildcard] (type mysql.ErrMessage) as type string in argument to terror.ClassJSON.New ../../../go/go_modules/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20191211070559-a94cff903cd1/types/json/constants.go:218:112: cannot use mysql.MySQLErrName[mysql.ErrInvalidJSONContainsPathType] (type mysql.ErrMessage) as type string in argument to terror.ClassJSON.New ../../../go/go_modules/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20191211070559-a94cff903cd1/types/json/constants.go:220:106: cannot use mysql.MySQLErrName[mysql.ErrInvalidJSONPathArrayCell] (type mysql.ErrMessage) as type string in argument to terror.ClassJSON.New ../../../go/go_modules/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20191211070559-a94cff903cd1/types/json/constants.go:224:48: cannot use map[terror.ErrCode]uint16{...} (type map[terror.ErrCode]uint16) as type map[terror.ErrCode]struct {} in assignment

github.com/shirou/gopsutil/disk

../../../go/go_modules/pkg/mod/github.com/shirou/gopsutil@v2.19.10+incompatible/disk/disk_darwin.go:117:43: cannot use stat.Fstypename[:] (type []byte) as type []int8 in argument to common.IntToString

XiRanZhang commented 11 months ago

I tried a different version, and it worked. modify go.mod file like this: github.com/pingcap/parser v3.1.2+incompatible github.com/pingcap/tidb v0.0.0-20190117121324-5f8265a8f9be