diff --git a/executor/builder.go b/executor/builder.go index 6ffaa2eff4908..6d8791255aec9 100644 --- a/executor/builder.go +++ b/executor/builder.go @@ -211,9 +211,7 @@ func (b *executorBuilder) buildCancelDDLJobs(v *plannercore.CancelDDLJobs) Execu func (b *executorBuilder) buildChange(v *plannercore.Change) Executor { return &ChangeExec{ - NodeType: v.NodeType, - State: v.State, - NodeID: v.NodeID, + ChangeStmt: v.ChangeStmt, } } diff --git a/executor/change.go b/executor/change.go index 1e066c82b398d..2404ff36dfdcc 100644 --- a/executor/change.go +++ b/executor/change.go @@ -15,6 +15,7 @@ package executor import ( "context" + "github.com/pingcap/parser/ast" "strings" "github.com/pingcap/errors" @@ -26,10 +27,7 @@ import ( // ChangeExec represents a change executor. type ChangeExec struct { baseExecutor - - NodeType string - State string - NodeID string + *ast.ChangeStmt } // Next implements the Executor Next interface. diff --git a/planner/core/common_plans.go b/planner/core/common_plans.go index 38ccc1d03305e..912103f0f98b9 100644 --- a/planner/core/common_plans.go +++ b/planner/core/common_plans.go @@ -136,10 +136,7 @@ type CancelDDLJobs struct { // Change represents a change plan. type Change struct { baseSchemaProducer - - NodeType string - State string - NodeID string + *ast.ChangeStmt } // Prepare represents prepare plan. diff --git a/planner/core/planbuilder.go b/planner/core/planbuilder.go index e60fef3758e93..f3081373691bf 100644 --- a/planner/core/planbuilder.go +++ b/planner/core/planbuilder.go @@ -225,9 +225,7 @@ func (b *PlanBuilder) Build(node ast.Node) (Plan, error) { func (b *PlanBuilder) buildChange(v *ast.ChangeStmt) (Plan, error) { exe := &Change{ - NodeType: v.NodeType, - State: v.State, - NodeID: v.NodeID, + ChangeStmt: v, } return exe, nil }