Skip to content

Commit

Permalink
change
Browse files Browse the repository at this point in the history
  • Loading branch information
D3Hunter committed Aug 29, 2024
1 parent e55266d commit 7e3de90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions pkg/meta/meta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ func TestInfoSchemaV2DataFieldsCorrectnessAfterBootstrap(t *testing.T) {
// create database
dbInfo := &model.DBInfo{
ID: 10001,
Name: model.NewCIStr("sc"),
Name: pmodel.NewCIStr("sc"),
Charset: "utf8",
Collate: "utf8_general_ci",
State: model.StatePublic,
Expand All @@ -975,13 +975,13 @@ func TestInfoSchemaV2DataFieldsCorrectnessAfterBootstrap(t *testing.T) {
// create table with partition info
tblInfo := &model.TableInfo{
ID: 10002,
Name: model.NewCIStr("cs"),
Name: pmodel.NewCIStr("cs"),
Charset: "latin1",
Collate: "latin1_bin",
State: model.StatePublic,
Partition: &model.PartitionInfo{
Definitions: []model.PartitionDefinition{
{ID: 1, Name: model.NewCIStr("p1")},
{ID: 1, Name: pmodel.NewCIStr("p1")},
},
Enable: true,
},
Expand Down Expand Up @@ -1009,7 +1009,7 @@ func TestInfoSchemaV2DataFieldsCorrectnessAfterBootstrap(t *testing.T) {
require.Equal(t, tbl.Meta().ID, tblInfo.ID)

//byName, traverse byName and load from store,
tbl, err = is.TableByName(context.Background(), model.NewCIStr("sc"), model.NewCIStr("cs"))
tbl, err = is.TableByName(context.Background(), pmodel.NewCIStr("sc"), pmodel.NewCIStr("cs"))
require.NoError(t, err)
require.Equal(t, tbl.Meta().ID, tblInfo.ID)

Expand All @@ -1019,7 +1019,7 @@ func TestInfoSchemaV2DataFieldsCorrectnessAfterBootstrap(t *testing.T) {
require.Equal(t, tbl.Meta().ID, tblInfo.ID)

//schemaMap, traverse schemaMap find dbInfo
db, ok := is.SchemaByName(model.NewCIStr("sc"))
db, ok := is.SchemaByName(pmodel.NewCIStr("sc"))
require.True(t, ok)
require.Equal(t, db.ID, dbInfo.ID)

Expand Down
2 changes: 1 addition & 1 deletion pkg/planner/cardinality/selectivity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ func TestBuiltinInEstWithoutStats(t *testing.T) {
tk.MustQuery("explain format='brief' select * from t where a in (1, 2, 3, 4, 5, 6, 7, 8)").Check(expectedA)
tk.MustQuery("explain format='brief' select * from t where b in (1, 2, 3, 4, 5, 6, 7, 8)").Check(expectedB)
require.NoError(t, h.Update(context.Background(), is))
tbl, err := is.TableByName(context.Background(), model.NewCIStr("test"), model.NewCIStr("t"))
tbl, err := is.TableByName(context.Background(), pmodel.NewCIStr("test"), pmodel.NewCIStr("t"))
require.NoError(t, err)
statsTbl, found := h.Get(tbl.Meta().ID)
require.True(t, found)
Expand Down

0 comments on commit 7e3de90

Please sign in to comment.