Skip to content

Commit

Permalink
executor: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zimulala committed Oct 25, 2018
1 parent 1162a3f commit 361a41d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions executor/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ func (e *DDLExec) Next(ctx context.Context, chk *chunk.Chunk) (err error) {
}
e.done = true

// For every DDL, we must commit current transaction.
if err := e.ctx.NewTxn(); err != nil {
// For each DDL, we should commit the previous transaction and create a new transaction.
if err = e.ctx.NewTxn(); err != nil {
return errors.Trace(err)
}
defer func() { e.ctx.GetSessionVars().StmtCtx.IsDDLJobInQueue = false }()
Expand Down

0 comments on commit 361a41d

Please sign in to comment.