Skip to content

Commit

Permalink
fix compile
Browse files Browse the repository at this point in the history
Signed-off-by: lance6716 <[email protected]>
  • Loading branch information
lance6716 committed Sep 2, 2024
1 parent be302dd commit 3eb0df9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
12 changes: 4 additions & 8 deletions dm/pkg/schema/tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,12 @@ func (tr *Tracker) GetTableInfo(table *filter.Table) (*model.TableInfo, error) {
if tr.closed.Load() {
return nil, dmterror.ErrSchemaTrackerIsClosed.New("fail to get table info")
}
return tr.upstreamTracker.TableByName(context.Background(), model.NewCIStr(table.Schema), model.NewCIStr(table.Name))
return tr.upstreamTracker.TableByName(model.NewCIStr(table.Schema), model.NewCIStr(table.Name))
}

// GetCreateTable returns the `CREATE TABLE` statement of the table.
func (tr *Tracker) GetCreateTable(ctx context.Context, table *filter.Table) (string, error) {
tableInfo, err := tr.upstreamTracker.TableByName(ctx, model.NewCIStr(table.Schema), model.NewCIStr(table.Name))
tableInfo, err := tr.upstreamTracker.TableByName(model.NewCIStr(table.Schema), model.NewCIStr(table.Name))
if err != nil {
return "", err
}
Expand Down Expand Up @@ -251,7 +251,7 @@ func (tr *Tracker) ListSchemaTables(schema string) ([]string, error) {
// TODO: move out of this package!
func (tr *Tracker) GetSingleColumnIndices(db, tbl, col string) ([]*model.IndexInfo, error) {
col = strings.ToLower(col)
t, err := tr.upstreamTracker.TableByName(context.Background(), model.NewCIStr(db), model.NewCIStr(tbl))
t, err := tr.upstreamTracker.TableByName(model.NewCIStr(db), model.NewCIStr(tbl))
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -333,18 +333,14 @@ func (tr *Tracker) CreateTableIfNotExists(table *filter.Table, ti *model.TableIn
tableName := model.NewCIStr(table.Name)
ti = cloneTableInfo(ti)
ti.Name = tableName
<<<<<<< HEAD
return tr.upstreamTracker.CreateTableWithInfo(tr.se, schemaName, ti, ddl.OnExistIgnore)
=======
return tr.upstreamTracker.CreateTableWithInfo(tr.se, schemaName, ti, nil, ddl.WithOnExist(ddl.OnExistIgnore))
>>>>>>> 2fcbb315f0 (dep(*): update tidb to include DM SchemaTracker fix (#11410))
}

// SplitBatchCreateTableAndHandle will split the batch if it exceeds the kv entry size limit.
func (tr *Tracker) SplitBatchCreateTableAndHandle(schema model.CIStr, info []*model.TableInfo, l int, r int) error {
var err error
if err = tr.upstreamTracker.BatchCreateTableWithInfo(
tr.se, schema, info[l:r], ddl.WithOnExist(ddl.OnExistIgnore),
tr.se, schema, info[l:r], ddl.OnExistIgnore,
); kv.ErrEntryTooLarge.Equal(err) {
if r-l == 1 {
return err
Expand Down
7 changes: 0 additions & 7 deletions dm/syncer/expr_filter_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,9 @@ import (
"context"
"testing"

<<<<<<< HEAD
ddl2 "github.com/pingcap/tidb/ddl"
"github.com/pingcap/tidb/parser/ast"
"github.com/pingcap/tidb/util/filter"
=======
ddl2 "github.com/pingcap/tidb/pkg/ddl"
context2 "github.com/pingcap/tidb/pkg/expression/context"
"github.com/pingcap/tidb/pkg/parser/ast"
"github.com/pingcap/tidb/pkg/util/filter"
>>>>>>> 2fcbb315f0 (dep(*): update tidb to include DM SchemaTracker fix (#11410))
"github.com/pingcap/tiflow/dm/config"
tcontext "github.com/pingcap/tiflow/dm/pkg/context"
"github.com/pingcap/tiflow/dm/pkg/log"
Expand Down

0 comments on commit 3eb0df9

Please sign in to comment.