Skip to content

Commit

Permalink
make build
Browse files Browse the repository at this point in the history
Signed-off-by: joccau <zak.zhao@pingcap.cn>
  • Loading branch information
joccau committed Sep 20, 2024
1 parent 9cb1723 commit 6ceb370
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 5 additions & 3 deletions pkg/ddl/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -2157,11 +2157,13 @@ func (e *executor) RebaseAutoID(ctx sessionctx.Context, ident ast.Ident, newBase
CDCWriteSource: ctx.GetSessionVars().CDCWriteSource,
SQLMode: ctx.GetSessionVars().SQLMode,
}
job.FillArgs(&model.RebaseAutoIDArgs{
args := &model.RebaseAutoIDArgs{
NewBase: newBase,
Force: force,
})
err = e.DoDDLJob(ctx, job)
}
// need fill args, the job will be pushed subjob.
job.FillArgs(args)
err = e.doDDLJob2(ctx, job, args)
return errors.Trace(err)
}

Expand Down
7 changes: 2 additions & 5 deletions pkg/meta/model/job_args.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"encoding/json"

"github.com/pingcap/errors"
"github.com/pingcap/tidb/pkg/parser/model"
pmodel "github.com/pingcap/tidb/pkg/parser/model"
"github.com/pingcap/tidb/pkg/util/intest"
)
Expand Down Expand Up @@ -558,10 +557,8 @@ type ModifyTableCharsetAndCollateArgs struct {

func (a *ModifyTableCharsetAndCollateArgs) fillJob(job *Job) {
intest.Assert(job.Version == JobVersion1 || job.Version == JobVersion2, "job version is invalid")

if job.Version == JobVersion1 {
job.Args = []any{a.ToCharset, a.ToCollate, a.NeedsOverwriteCols}

} else {
job.Args = []any{a}
}
Expand All @@ -583,7 +580,7 @@ func GetModifyTableCharsetAndCollateArgs(job *Job) (*ModifyTableCharsetAndCollat

// AlterIndexVisibilityArgs is the arguments for ActionAlterIndexVisibility ddl.
type AlterIndexVisibilityArgs struct {
IndexName model.CIStr
IndexName pmodel.CIStr
Invisible bool
}

Expand All @@ -601,7 +598,7 @@ func (a *AlterIndexVisibilityArgs) fillJob(job *Job) {
func GetAlterIndexVisibilityArgs(job *Job) (*AlterIndexVisibilityArgs, error) {
if job.Version == JobVersion1 {
var (
indexName model.CIStr
indexName pmodel.CIStr
invisible bool
)
if err := job.DecodeArgs(&indexName, &invisible); err != nil {
Expand Down

0 comments on commit 6ceb370

Please sign in to comment.