Skip to content

Commit

Permalink
ddl: fix TestCancelJob and TestShowIndex tests (pingcap#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
Defined2014 authored Mar 23, 2022
1 parent 36f8113 commit 0e8e57e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ddl/cancel_ddl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ func buildDropColumnJob(dbInfo *model.DBInfo, tblInfo *model.TableInfo, colName
Type: model.ActionDropColumn,
BinlogInfo: &model.HistoryInfo{},
MultiSchemaInfo: &model.MultiSchemaInfo{},
Args: []interface{}{model.NewCIStr(colName)},
Args: []interface{}{model.NewCIStr(colName), false},
}
}

Expand Down
3 changes: 2 additions & 1 deletion ddl/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,8 @@ func (w *worker) onCreateIndex(d *ddlCtx, t *meta.Meta, job *model.Job, isPK boo
job.SnapshotVer = 0
job.SchemaState = model.StateWriteReorganization
case model.StateWriteReorganization:
done, ver, err := multiSchemaChangeOnCreateIndexFinish(t, job, tblInfo, indexInfo)
var done bool
done, ver, err = multiSchemaChangeOnCreateIndexFinish(t, job, tblInfo, indexInfo)
if done {
return ver, err
}
Expand Down
1 change: 0 additions & 1 deletion ddl/multi_schema_change_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,6 @@ func (i *idxIDExt) IndexID(name string) int64 {

type cancelOnceHook struct {
store kv.Storage
dom *domain.Domain
triggered bool
cancelErr error
pred func(job *model.Job) bool
Expand Down

0 comments on commit 0e8e57e

Please sign in to comment.